mu's query parser is the piece of software that turns your queries
into something the Xapian database can understand. So, if you query
"maildir:/inbox and subject:bla" this must be translated into a
Xapian::Query object which will retrieve the sought after messages.
Since mu's beginning, almost a decade ago, this parser was based on
Xapian's default Xapian::QueryParser. It works okay, but wasn't really
designed for the mu use-case, and had a bit of trouble with anything
that's not A..Z (think: spaces, special characters, unicode etc.).
Over the years, mu added quite a bit of pre-processing trickery to
deal with that. Still, there were corner cases and bugs that were
practically unfixable.
The solution to all of this is to have a custom query processor that
replaces Xapian's, and write it from the ground up to deal with the
special characters etc. I wrote one, as part of my "future, post-1.0
mu" reseach project, and I have now backported it to the mu 0.9.19.
From a technical perspective, this is a major cleanup, and allows us
to get rid of much of the fragile preprocessing both for indexing and
querying. From and end-user perspective this (hopefully) means that
many of the little parsing issues are gone, and it opens the way for
some new features.
From an end-user perspective:
- better support for special characters.
- regexp search! yes, you can now search for regular expressions, e.g.
subject:/h.ll?o/
will find subjects with hallo, hello, halo, philosophy, ...
As you can imagine, this can be a _heavy_ operation on the database,
and might take quite a bit longer than a normal query; but it can be
quite useful.
Following code review (PR 1118):
- Warn the user about the fact that the
'mu4e-compose-crypto-reply-policy' variable is deprecated
- Removed a leftover debug message
- Edited typo in the name of the new variable
Display the signers in the signature headers, so users can easily very
that a verified signed message was indeed signed by the expected sender.
We can't check using 'From:' automatically as that gives too many false
negatives.
Added support for sorting by mailing-list; note that this ultimately is
a sort by the 'list-id', so the items will be in that alphabetical
order, which is not necessarily the same as the order of the friendly
names.
Update mu4e~headers-quit-buffer and mu4e~main-menu.
mu4e~headers-quit-buffer in single-window mode now kills current buffer
instead of quitting mu4e.
mu4e~main-menu is updated to redisplay the main menu on context switch
or unknown keybinding, display errors in commands better, and to handle
C-g and ESC keys.
Thanks to Joost Kremers for the suggestions.
Even though the user may be editing this expression there is no reason
to not have the mu4e~headers-search-hist present for the prompt. Emacs
will only replace it with system wide history which would likely
contain irrelevant history for the action.