v3 sexpr query parser

Subject: v3 sexpr query parser

Date: Fri, 30 Jul 2021 09:55:40 -0300

To: notmuch@notmuchmail.org


From: David Bremner

This obsoletes and replaces [1]. I updated the syntax to be more
orthogonal, and documented it [2].  The examples in the documentation
now show solutions for several outstanding feature requests, so even
if you don't feel up to reviewing the patch series, have a look at the
user syntax [2] and send feedback. It's much easier to change that now
before people start relying on it.

Gentle reminder for the lisp haters, there is no plan to discard or
deprecated the current query parser.

Looking at the issues from [1],

1) The new query parser is still only hooked into the notmuch search
subcommand. Still waiting on (2).

2) The command line option --query-syntax={sexp,xapian} is still a bit
klunky.  I was thinking maybe --squery would be a nice shorter

3) There is now documentation, see [2] (or build it yourself).

4) I submitted a corpus of utf8 test expressions to upstream sfsexp,
so I'm feeling OK about utf8 support.

5) I did the more idiomatic thing mentioned.

6) I switched to the (List notmuch) style.

7) Wildcards within fields are now implemented, with the syntax
'(subject (starts-with *))'. I'm open to a shorter alias for

One new comment/issue:

8) I'm not wild about the term "modifier" used in the
documentation. I'm open to suggestions for a better name.  I do think
the division into fields, operators, and "other" is helpful

[1]: id:20210718024021.3850340-1-david@tethera.net
[2]: https://www.cs.unb.ca/~bremner/scratch/notmuch-doc-wip/man7/notmuch-sexp-queries.html

notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org