unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Tom Fitzhenry <tom@tom-fitzhenry.me.uk>, notmuch@notmuchmail.org
Cc: Tom Fitzhenry <tomfitzhenry@google.com>
Subject: Re: [PATCH] emacs: add notmuch-expr, sexp-style queries
Date: Thu, 21 May 2020 17:32:22 -0400	[thread overview]
Message-ID: <87blmhj7o9.fsf@fifthhorseman.net> (raw)
In-Reply-To: <20200513100024.8474-1-tom@tom-fitzhenry.me.uk>


[-- Attachment #1.1: Type: text/plain, Size: 572 bytes --]

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

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2020-05-21 21:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 10:00 [PATCH] emacs: add notmuch-expr, sexp-style queries Tom Fitzhenry
2020-05-21 21:32 ` Daniel Kahn Gillmor [this message]
2020-11-13 12:01 ` [PATCH v2] " Tom Fitzhenry
2020-11-16  9:48   ` David Edmondson
2020-11-16 21:09   ` Jonas Bernoulli
2020-11-22 14:07   ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blmhj7o9.fsf@fifthhorseman.net \
    --to=dkg@fifthhorseman.net \
    --cc=notmuch@notmuchmail.org \
    --cc=tom@tom-fitzhenry.me.uk \
    --cc=tomfitzhenry@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).