quoting: (was: Re: bug#56442: gnus-search-run-search: Hits notmuch command line length limits)

Subject: quoting: (was: Re: bug#56442: gnus-search-run-search: Hits notmuch command line length limits)

Date: Sat, 09 Jul 2022 22:19:47 +0300

To: Eric Abrahamsen

Cc: notmuch@notmuchmail.org

From: Tomi Ollila


On Sat, Jul 09 2022, Eric Abrahamsen wrote:

>
> Huh, I tried this a couple months ago with a more complicated query,
> like:
>
> thread:{from:bob or from:jane}
>
> and I remember notmuch barking at me about spaces or the "or" or
> something -- anyway I got the impression that it couldn't accept
> multi-part queries inside the "thread:{}" syntax. But looking at your
> patch maybe I just needed to quote differently?

I am not sure whether this is relevant, but I give a shot...

I tried the following queries from command line:

$ notmuch search 'thread:"{from:bob or from:jane}"'

thread:0000000000000b91   2009-01-20 [6/6] ...
thread:00000000000015fa   2008-11-26 [2/2] ...

and

$ notmuch search 'from:bob or from:jane}':

thread:0000000000000b91   2009-01-20 [1/6] ...
thread:00000000000015fa   2008-11-26 [1/2] ...


The outer '':s protect from shell expansion so what is
inside those goes verbatim to notmuch and from there to
xapian query parser (IIRC). 

Former includes all messages in thread where at least
one message matched to the query and latter just those
messages that match the query.

Like Sean mentioned in another message, Xapian converts ""
to " in query string (probably something irrelevant in this
discussion) the thread:"{...}" syntax binds the whole expression
to this thread: prefix (Why {...} is not enough is beyond me ;D)

Tomi

>
> Anyway I'll give this a test this weekend. It would be *very* nice if we
> could use this syntax rather than the ugly home-grown one.
>
> Thanks for the report!
>
> Eric
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: