emacs: set query-context to nil if its "" or "*"
authorJani Nikula <jani@nikula.org>
Sun, 13 Aug 2017 09:07:24 +0000 (12:07 +0300)
committerDavid Bremner <david@tethera.net>
Sun, 20 Aug 2017 11:32:07 +0000 (08:32 -0300)
commitcb5253578d983471e5b55604581d390fcdda38f4
treea5bb9e6b4234dece1c8d92de9d735f4a2db4062f
parentcd8551d53a69c43aed5276abc1e492d3d6553979
emacs: set query-context to nil if its "" or "*"

The queries "" and "*" are special cased in the notmuch library to
match all messages, but only if they're the entire query. They can't
be combined with other queries, such as "* AND foo", in which case
they "leak" down to the Xapian query parser.

Notmuch show and tree buffers inadvertently combine the thread query
with said special queries, causing incorrect collapsing of
messages. Handle the special queries specially. We already do a
similar thing in notmuch-search-filter.
emacs/notmuch-show.el
emacs/notmuch-tree.el