On Sat, Apr 07 2018, David Bremner wrote:
> I think we've diverged enough from the Xapian query parser
> that we can't rely on that syntax description . As far as I can
> tell,  also only discusses quotes in the context of phrases.
> : https://xapian.org/docs/queryparser.html
> doc/man7/notmuch-search-terms.rst | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
> diff --git a/doc/man7/notmuch-search-terms.rst
> index b4d784a3..a4e5abfc 100644
> --- a/doc/man7/notmuch-search-terms.rst
> +++ b/doc/man7/notmuch-search-terms.rst
> @@ -273,6 +273,28 @@ Both of these will match a subject "Free Delicious
> Pizza" while
> will not.
> +Double quotes are also used by the notmuch query parser to protect
> +boolean terms or regular expressions containing spaces or other
> +special characters, e.g.
> + tag:"a tag"
> + folder:"/^.*/(Junk|Spam)$/"
> +As with phrases, you will probably have to protect the double quotes
The 'probably' gives somewhat uncertain answer -- perhaps s/will probably //
Also, perhaps the example in line 45 could be in format:
notmuch search 'from:"/bob@.*[.]example[.]com/"'
-- format that should be always safe to use -- good for
e.g. tldr people like me.
Btw, the ones who have notmuch email since 2011-10-18 can try the
notmuch count 'from:/Richard Stallman/'
notmuch count 'from:/Richard Stallma/'
notmuch count 'from:"/Richard Stallman/"'
notmuch count 'from:"/Richard Stallma/"'
I find all but 3rd odd (1st one "works" even there are spaces, and
second and last don't find matches...).
> +from the shell e.g.
> + % notmuch search 'folder:"/^.*/(Junk|Spam)$/"'
> DATE AND TIME SEARCH
> notmuch mailing list
notmuch mailing list