emacs-notmuch: A Xapian exception occurred parsing query
david at tethera.net
Sun Mar 18 06:49:50 PDT 2018
Olly Betts <olly at survex.com> writes:
> On 2018-02-07, David Bremner wrote:
>> The underlying issue is that * is parsed (simplistically) by notmuch
>> before passing to Xapian, so only works if it is the entire query.
>> For cases like you report, where the user has not entered '*', but
>> rather it is contained in some generated query string, we could fix the
>> problem by adding a prefix like "special:*".
> If you're generating the query string, you could presumably just
> generate « tag:flagged » for this case.
Yes, that should in principle be a Simple Matter of Programming
(TM). But this doesn't affect the underlying infelicity that
"*" is a valid notmuch query, while
"* and tag:foo" is not
> Though it's generally better not to try to generate a string to parse,
> but instead to parse any part(s) the user actually wrote and combine
> the resulting Xapian::Query objects with directly constructed objects
> for other filters, etc.
That's a bit tougher here, since the emacs interface is calling the
notmuch CLI with query strings.
More information about the notmuch