Implement a new experimental json2 format for mu-find, which gets rid of
the ":" prefixes for fields, i.e., "subject" instead of ":subject".
Document it as well.
Otherwise:
(with the \040 specifying a space in the regular expression, and and extra '\' to escape it)
is rendered as:
(with the $ 40 specifying a space in the regular expression, and and extra `$´ to escape it)
Fixes: 5e2b7d52b2 ("mu-query.7: update documentation")
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Commit 721aadc140 ("man: change quoting style") replaced single-quoted strings
of the form:
'lorem ipsum'
with:
`lorem ipsum'
to prevent the possibility of single quotes appearing at the beginning of lines,
because these will be misinterpreted by troff. However, changes to the man-page
sources in 1.12.9 reintroduced some of these, including one which does appear at
the beginning of a line in mu-query(7):
'"', '*', '(' and ')'. The details are shell-specific. In case of doubt, the
which results in the following warning:
troff:<standard input>:25: warning: macro '"',' not defined
and the omission of that line from the rendered paragraph:
NOTE: if you use queries on the command-line (say, for mu find), you
need to quote any characters that would otherwise be interpreted by the
shell, such as *--analyze option can be useful.
Use back-ticks for the opening quotes.
Fixes: 5e2b7d52b2 ("mu-query.7: update documentation")
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
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'.
This change makes index cleanup ~4x faster by changing how we
determine whether a file mentioned by the database still exists on
disk. Previously, we'd call access(2) for each file the database
mentioned. Doing so produced a lot of system call overhead. Now, we
read the directory entries of the directories containing the files
whose existence we're checking, build a hash table from what we find,
then do the existence check against this hash table instead of
entering the kernel.
The semantics of the cleanup check do change subtly, however.
Previously, we checked whether the mentioned file was *readable*.
Now we check merely that it exists. Extant but unreadable files in
maildirs should be rare.
BEFORE:
$ time mu index --lazy-check
lazily indexing maildir /home/dancol/Mail -> store /home/dancol/.cache/mu/xapian
/ indexing messages; checked: 0; updated/new: 0; cleaned-up: 0
real 0m19.310s
user 0m1.803s
sys 0m12.999s
AFTER:
$ time mu --debug index --lazy-check
lazily indexing maildir /home/dancol/Mail -> store /home/dancol/.cache/mu/xapian
- indexing messages; checked: 0; updated/new: 0; cleaned-up: 0
real 0m4.584s
user 0m2.433s
sys 0m2.133s
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.