From: Michael J Gruber <michaeljgruber+grubix+git@gmail.com>
To: 杨令 <yangling1984@gmail.com>
Cc: erik colson <eco@ecocode.net>, notmuch@notmuchmail.org
Subject: Re: contact instead of (to or from)
Date: Fri, 10 Jun 2022 09:47:46 +0200 [thread overview]
Message-ID: <CAA19uiSGhF1ccAxJaRNOyx_gAdmT5T8JLJpVA+rA=jty5paCdA@mail.gmail.com> (raw)
In-Reply-To: <20220610035110.uvbfvd5lt6afqeyg@yangling-inspiron155510>
[rearranged for bottom post style]
Am Fr., 10. Juni 2022 um 05:51 Uhr schrieb 杨令 <yangling1984@gmail.com>:
> On Fri 2022-06-10 00:35:12, erik colson wrote:
> > Date: Fri, 10 Jun 2022 00:35:12 +0200
> > From: erik colson <eco@ecocode.net>
> > To: notmuch@notmuchmail.org
> > Subject: contact instead of (to or from)
> >
> > Hi,
> >>
> > Coming from mu4e I loved the query "contact" which includes "to" or
> > "from" the contact in the results.
> > Is there something equivalent in notmuch?
> ⮩ Hi, Erik, I don't think notmuch has a built-in `contact` query, but I
> think it's easy to build a saved search.
>
> (add-to-list 'notmuch-saved-searches '(:name "query" :query "to:... or from:..." :key "r"))
>
> `:key` part is optional.
>
> --
> L.Yang
If you have notmuch with sexp queries there is a pure notmuch solution:
notmuch config set squery.Contact '(macro (x) (or (from ,x) (to ,x)))'
Use it with either of the following forms:
notmuch count --query=sexp -- '(Contact erik)'
notmuch count sexp:'"(Contact erik)"'
Fun fact: I learned this by mistaking your emacs lisp for sexp first
and vaguely remembering the existence of sexp macros, then rtfming ...
Michael\r
next prev parent reply other threads:[~2022-06-10 7:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 22:35 contact instead of (to or from) erik colson
2022-06-10 3:51 ` 杨令
2022-06-10 7:47 ` Michael J Gruber [this message]
2022-06-10 8:43 ` erik colson
2022-06-10 7:14 ` Fraga, Eric
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='CAA19uiSGhF1ccAxJaRNOyx_gAdmT5T8JLJpVA+rA=jty5paCdA@mail.gmail.com' \
--to=michaeljgruber+grubix+git@gmail.com \
--cc=eco@ecocode.net \
--cc=notmuch@notmuchmail.org \
--cc=yangling1984@gmail.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).