Comments (11)
I assume that if mu server is running then Emacs is also running (mu server is started by mu4e) and Emacs server is enabled. And my way to solve the problem is the following.
#!/usr/bin/env bash
if pgrep -f 'mu server'; then
emacsclient -e '(mu4e-update-index)'
else
mu index
fi
from mu.
Just a tip: if you have an Emacs daemon running, you can index with mu4e using the following shell command:
emacsclient -e '(mu4e-update-index)'
from mu.
Just a important note for the readers:
The full command set to it work fine is:
pkill -2 -u $UID mu
sleep 1
mu index
The 1 second delay was needed for me. ;-)
from mu.
Remove the ~/.mu
and re-run mu index
.
from mu.
The underlying database (Xapian) can be opened in read/write-mode only once... To prevent this error, you can either retrieve your mail from within mu4e (ie., 'U' in the main view), or in your cron script put something like:
pkill -2 -u $UID mu
This will sent a SIGINT to the mu process, which will then terminate gracefully. Mu4e will automatically restart mu when it is needed again (of course, you can still only have one mu at the same time, but in practice it works quite well).
from mu.
Hi Dirk-Jan,
I have a similar problem, and of course your answer clarify everything. But my setup is a little bit different:
I make offlineimap+mu run in background. But when I launch mu4e the lock is taken and mu update does not work anymore. I have to update the db manually, which is not nice (make the email reading not interactive). Is it possible to force mu4e to open the xapian database read only, and let the offlineimap daemon to run mu index
?
Thank you.
from mu.
That's not possible...mu4e cannot do its job when it cannot write the database.
However, what you can do is either the pkill trick mentioned above, or in your background script check for a running mu and if there is already, let mu4e handle indexing.
from mu.
See also the related discussion in the list: https://groups.google.com/forum/#!searchin/mu-discuss/Keybinding$20for$20mu4e-update-index|sort:relevance/mu-discuss/MCbP8Gwiujc/kg1QA2rPAgAJ
from mu.
I was doing what @tituomin writes and from version 1.x of mu I cannot even run mu4e
on Emacs.
error in process sentinel: mu4e~proc-sentinel: Database is locked by another process
error in process sentinel: Database is locked by another process
Running pkill -2 -u $UID mu
on a console and then trying again yields the same result.
I swear I haven't touch my configuration of mu for Emacs or the configuration of my goimapnotify (nor touched the source code in months) and after the update to 1.x mu have been showing such behavior.
from mu.
Any idea how to suppress the message resulting from mu4e-update-index
?
For some reason, (let ((inhibit-message t)) (mu4e-update-index))
still shows it.
I assume that if mu server is running then Emacs is also running (mu server is started by mu4e) and Emacs server is enabled. And my way to solve the problem is the following.
#!/usr/bin/env bash if pgrep -f 'mu server'; then emacsclient -e '(mu4e-update-index)' else mu index
from mu.
I assume that if mu server is running then Emacs is also running (mu server is started by mu4e) and Emacs server is enabled. And my way to solve the problem is the following.
#!/usr/bin/env bash if pgrep -f 'mu server'; then emacsclient -e '(mu4e-update-index)' else mu index fi
Thank you,
but consider there is more than one person using mu4e simultaneously.
Then you have to check for "mu server" UID for this specific user.
Martin.
from mu.
Related Issues (20)
- [mu4e rfe] Exit mu4e-read-option when cancelling the action selection menu HOT 3
- [mu4e rfe] Let `display-buffer-alist` dictate compose buffers HOT 3
- [mu bug] Issues locating packages on Mac OS X HOT 3
- [mu bug] `mu` binary built using `make` crashes on ARM64 MAC OS HOT 8
- [misc] clarification about MIME parts in 1.12 HOT 3
- [misc] [mu4e] Why does (mu4e-headers-mark-pattern) ask for a field to match? HOT 1
- [mu bug] avoid `find-file` HOT 1
- [mu4e bug] Clicking links opens them twice HOT 5
- [mu4e bug] switch context in 1.12 not working HOT 6
- [mu4e rfe] Make it easier to access MIME part of given type HOT 1
- [mu4e bug] `mu4e-headers-mark-thread-using-markpair` does not respect `mu4e-headers-advance-after-mark` HOT 3
- [mu4e rfe] Allow saving marks before exiting emacs
- [mu bug] mu server error: expected schema-version 500, but got 466 HOT 2
- [mu4e bug] Sent messages not stored. HOT 2
- [mu4e bug] The new mu4e-compose-new function does not return buffer name
- [mu bug] mu4e-compose-attach-captured-message
- [mu4e bug] `message-cite-reply-position` is not respected in 1.12
- [mu bug] Mu not recognising updated/new emails HOT 6
- [mu4e rfe] HTML Reply and Forward messages have completely different processing HOT 3
- [misc] [documentation] Document how mu works with encrypted mail. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mu.