Re: emacs-notmuch: A Xapian exception occurred parsing query

Subject:Re: emacs-notmuch: A Xapian exception occurred parsing query

Date:Sun, 18 Mar 2018 10:49:50 -0300

To:Olly Betts ,notmuch@notmuchmail.org

Cc:

From:David Bremner


Olly Betts <olly@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.  
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: