[PATCH] emacs: add notmuch-expr, sexp-style queries

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu May 21 14:32:22 PDT 2020


On Wed 2020-05-13 20:00:24 +1000, Tom Fitzhenry wrote:
> notmuch-expr allows you to write notmuch search queries in sexp style like:
>
> (notmuch-expr
>   '(and
>     (to "emacs-devel")
>     "info manual"
>     (or
>       (not (is "spam"))
>       (is "important"))))
>
> which will generate the textual query:
>
> "to:emacs-devel AND (NOT is:spam OR is:important) AND \"info manual\""

I like this idea!

> +(defun notmuch-expr--quote (s)
> +  ;; FIXME Escape s.
> +  (concat "\"" s "\""))

Shouldn't this FIXME be resolved before we consider merging?

          --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20200521/b1547579/attachment.sig>


More information about the notmuch mailing list