azynheira / mu0

Automatically exported from code.google.com/p/mu0
0 stars 0 forks source link

mu4e fails to index after updating email in maildirs #45

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. M-x mu4e
2. U

What is the expected output? What do you see instead?

From *Messages* buffer:
    Started mu4e with 16332 messages in store
    Retrieving mail...
    Updating the database...
    Error 1: indexing failed

What version of the product are you using? On what operating system?

- User-agent: mu4e 0.9.8.1; emacs 23.3.1
- Ubuntu 11.10; using Gnome 3.

Please provide any additional information below.

Configuration snippets:

Emacs:
(when (require 'mu4e nil 'noerror)
  (setq mu4e-user-mail-address-regexp "jladan@example\.com"
    mu4e-maildir       "~/Mail"     ;; top-level Maildir
    mu4e-sent-folder   "/Archive"   ;; where do i keep sent mail?
    mu4e-drafts-folder "/Drafts"    ;; where do i keep half-written mail?
    mu4e-trash-folder  "/Trash"     ;; where do i move deleted mail?
    mu4e-maildir-shortcuts '( ("/INBOX"     . ?i)
                  ("/Archive"   . ?a)
                  ("/lists.tup" . ?t))
    mu4e-html2text-command "html2text"
    mu4e-get-mail-command "pullmail-mu4e"))

"pullmail-mu4e" is a symlink to "pullmail", attached.

Original issue reported on code.google.com by ja...@ladan.ca on 13 Mar 2012 at 9:28

Attachments:

GoogleCodeExporter commented 8 years ago
Aside: If I run my "pullmail" script outside of mu4e, but while mu4e is open, I 
get the error:
    mu: mu_store_new_writable: xapian error 'Unable to get write lock on /home/james/.mu/xapian: already locked'

If I leave the script running from cron, should I just hide errors from mu and 
leave indexing up to mu4e itself?

Original comment by ja...@ladan.ca on 13 Mar 2012 at 9:30

GoogleCodeExporter commented 8 years ago
Current Xapian versions can only be opened once in read-write mode; which is a 
bit annoying if you use mu4e and some downloading in the background...

So, you can either do all the downloading in mu4e, or, if you want to use some 
external script, make it terminate the running mu instance (mu4e will recreate 
it, when needed).

You can terminate mu gracefully by sending it SIGTERM (2) (e.g., using pkill), 
and you can do just before updating the database (add a 1s sleep).

I'll add a note about that to the docs.

Note, in your script, you may want to use
   offlineimap -u quiet
to avoid any output.

Thanks,
Dirk.

Original comment by digg...@gmail.com on 14 Mar 2012 at 12:53

GoogleCodeExporter commented 8 years ago
Indexing after 'U' is also fine now that I've changed "~/Mail" to 
"/home/james/Mail".

(BTW - I use .offlineimaprc to set the quiet UI :))

Original comment by ja...@ladan.ca on 16 Mar 2012 at 5:56

GoogleCodeExporter commented 8 years ago
Following up on that 'aside' above, thanks for the auto-update feature. Now I 
leave email fetching to mu4e and don't bother with cron.

Original comment by ja...@ladan.ca on 20 Mar 2012 at 8:06

GoogleCodeExporter commented 8 years ago
Ah, thanks. Closing this then.

Original comment by digg...@gmail.com on 20 Mar 2012 at 9:58