Calling file-readable-p before reading a message file is fine
when the file is local, but when it's a remote file, doing so incurs
an extra network round trip. It's not really necessary to do so
either: if the file is missing, we'll fail in the insert-file-contents
below anyway, so we're missing out only on a nicer warning message.
This change turns the mu4e refresh timer into a named function, making
M-x list-timers output display a name having to do with mu4e instead
of an inscrutable "anonymous lambda" line.
There's mu4e--initialized which needs to run once per emacs session,
but we also have some setup to do for each "run" (mu4e --> mu4e-quit).
For the latter, we use mu4e--started.
Fixes#2818.
mu server uses PCRE-compatible regular expressions, but mu4e needs
Emacs-style. In simple cases, the two are the same, but when it gets
slightly more complicated they do not.
E.g.,
(foo|bar) => \(foo\|bar\)
Mu4e can do the conversion automatically, but for this the pcre2el
package (available in MELPA) is required, and is used if user installs
is. Anyway, this code implements the automatic conversion and adds some
documentation.
Fixes#2816.
Some message can have an _empty_ message-id, e.g. with:
In-Reply-To: <>
which we weren't filter out.
This would yield and _empty_ Thread-Id, in mu-message.cc
And this would make mu-query believe it had no matches in the first
query, in Query::Private::run_related, and effectively throw away the
results. (Xapian using empty string both for a "not found" result, and
"found an empty string doesn't help either).
So, avoid having an empty reference. Also add a unit-test.
Fixes#2812.
When you ask for bookmarks or maildirs through mu4e-ask-bookmark,
mu4e-ask-maildir, the counts are displayed in the (default) completions
next to the maildirs. This is a shorter version of the full display,
just showing either the delta or the number of unread messages, if any.
If you don't want to see these counts, there is mu4e-hide-short-counts.
Start mu4e if not already; with the transient menus it's easier possible
to try to do things with mu4e before it is started, so handle that
automatically.
Add a first version of a "transient" menu for mu4e. It's just a starting
point. It's not yet bound to any key, but you could e.g. add
(require 'mu4e-transient)
(global-set-key (kbd "C-c m") #'mu4e-transient-menu)
Basically, make the "mu find .... --analyze" information available in
mu4e, through a function mu4e-server-last-query.
This is shows the query as the server saw it, as well as the parse
s-expressions. This can be useful to see how some query is interpreted.