"Ben Mezger" <
m...@benmezger.nl> writes:
> I was reading this [1] documentation, and it seems there is a way to
> check the lock file by using the xapian-delve command:
>
> $ xapian-delve ~/.cache/mu/xapian
> UUID = d741098b-7ed7-4ec4-bd10-9aa49b7e2f81
> number of documents = 17462
> average document length = 1726.78
> document length lower bound = 20
> document length upper bound = 411552
> highest document id ever used = 17462
> has positional information = true
> revision = 5
> currently open for writing = true
>
> When mu4e is closed, it sets "currently open for writing = false", so we
> can simply grep that or further search the documentation as there might be
> a command which does it by return code, so we don't need to grep the string.
This seems like a fine approach as well.
> Though I don't use mu4e in the daemon, this seems like an interesting
> approach. Currently, I have a script which simply runs from time to time
> in order to index everything.
This would also work if you start the daemon with (server-start) while
in emacs, and then the script could be:
#+begin_src
mu index && emacsclient --eval '(mu4e-update-index)'
#+end_src
I think grepping the output of xapian-delve is really only helpful as it
avoids the bad return code, but still doesn't update the mu index in the
end, so you would have to update manually within emacs anyway.
--
Andrew Fontaine
afontaine.dev