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)
- [misc] Got mu4e Error 102 after send email with mu 1.12.4
- mu4e--compose-setup-completion is disabling message-completion-function unconditionaly HOT 2
- [mu4e bug] Using mu4e-user-agent breaks M-x report-emacs-bug HOT 1
- Work around broken encodings in received messages HOT 6
- [mu4e bug] wrong-number-of-arguments in mu4e--prepare-draft-buffer HOT 3
- [mu4e rfe] HOT 2
- [mu rfe] index arbitrary headers HOT 4
- [mu bug] Repeated database corruption HOT 16
- The function set as the value of `mu4e-sent-func` is not called when sending a message HOT 1
- mu4e composer no longer picks the right email address from where to send messages or reply to them HOT 1
- Autocomplete not working HOT 2
- [mu4e bug] Broken quoted message formatting in mu4e 1.12.4 HOT 6
- [mu4e bug] lisp expressions as bookmark don't seem to work as described in the manual HOT 2
- [mu bug] Wrong type argument: char-or-string-p, nil with SOME attachments HOT 2
- [mu4e rfe] Duplicate Message Indication HOT 3
- [mu4e bug] Garbled headers when editing a saved msg with no body HOT 4
- [mu4e bug] mu4e-compose-pre-hook is broken in v1.12+ HOT 4
- [mu4e rfe] Save all attachments in one time HOT 2
- Unable to set bookmark from mu4e view HOT 1
- [mu4e bug] Saved drafts not deleted after send HOT 3
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.