* contact instead of (to or from)
@ 2022-06-09 22:35 erik colson
2022-06-10 3:51 ` 杨令
2022-06-10 7:14 ` Fraga, Eric
0 siblings, 2 replies; 5+ messages in thread
From: erik colson @ 2022-06-09 22:35 UTC (permalink / raw)
To: notmuch
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?
thx
--
erik colson
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: contact instead of (to or from)
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
2022-06-10 7:14 ` Fraga, Eric
1 sibling, 1 reply; 5+ messages in thread
From: 杨令 @ 2022-06-10 3:51 UTC (permalink / raw)
To: erik colson; +Cc: notmuch
> 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
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?
>
> thx
> --
> erik colson
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org\r
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: contact instead of (to or from)
2022-06-09 22:35 contact instead of (to or from) erik colson
2022-06-10 3:51 ` 杨令
@ 2022-06-10 7:14 ` Fraga, Eric
1 sibling, 0 replies; 5+ messages in thread
From: Fraga, Eric @ 2022-06-10 7:14 UTC (permalink / raw)
To: erik colson; +Cc: notmuch@notmuchmail.org
On Friday, 10 Jun 2022 at 00:35, erik colson wrote:
> Coming from mu4e I loved the query "contact" which includes "to" or
> "from" the contact in the results.
> Is there something equivalent in notmuch?
I use "to:xxx" or "from:yyy" in my notmuch searches all the time for
emails to/from the specified contact.
--
Eric S Fraga via gnus (Emacs 29.0.50 2022-06-07) on Debian 11.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: contact instead of (to or from)
2022-06-10 3:51 ` 杨令
@ 2022-06-10 7:47 ` Michael J Gruber
2022-06-10 8:43 ` erik colson
0 siblings, 1 reply; 5+ messages in thread
From: Michael J Gruber @ 2022-06-10 7:47 UTC (permalink / raw)
To: 杨令; +Cc: erik colson, notmuch
[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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: contact instead of (to or from)
2022-06-10 7:47 ` Michael J Gruber
@ 2022-06-10 8:43 ` erik colson
0 siblings, 0 replies; 5+ messages in thread
From: erik colson @ 2022-06-10 8:43 UTC (permalink / raw)
To: Michael J Gruber, 杨令; +Cc: notmuch
Michael J Gruber <michaeljgruber+grubix+git@gmail.com> writes:
> notmuch config set squery.Contact '(macro (x) (or (from ,x) (to ,x)))'
This . is . awesome !! Thank you for opening my eyes on sexp queries !
--
erik colson
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-06-10 8:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2022-06-10 8:43 ` erik colson
2022-06-10 7:14 ` Fraga, Eric
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).