Move some items from mu4e-headers (mu4e--search-execute) to mu4e-search. The
code in mu4e-headers should focus on the output, and mu4e-search on the search
itself.
This makes things a bit more uniform with all the places where we use
"personal".
--my-address remains as an alias for the command-line option.
Add unit test.
Resolves#2806.
Instead of just the query-string or maildir name, allow
mu4e-ask-bookmark / mu4e-ask-folder to return the query-item, when a new
optional parameter QUERY-ITEM is non-nil.
Make mu4e-maildir-shortcut and mu4e-bookmarks understand a property
:hide-if-no-unread~, which hides the maildir/bookmark from the main-view
if there are no unread messages which the corresponding query.
In non-parent messages, such as completely new message, ensure the
mu4e-compose-type is available during the initial composition, i.e.,
enlarge the let to cover the rest of `mu4e--prepare-draft'.
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.