Is there a prefix that performs from: and to: simultaneously?

classic Classic list List threaded Threaded
6 messages Options
Attic Hermit Attic Hermit
Reply | Threaded
Open this post in threaded view
|

Is there a prefix that performs from: and to: simultaneously?

Batch file of my initial tagging script includes queries like below:

+john +friend -- tag:new AND from:[hidden email]
+john +friend -- tag:new AND to:[hidden email]

But I want to compress the above in one line like:

+john +friend -- tag:new AND from_or_to:[hidden email]

I know that I can achieve it approximately by querying without prefix,
but it'll also include the mails that include the string
"[hidden email]".

I look through the manual, man:notmuch-search-terms, but I couldn't find
the prefix I want.

--
Attic Hermit
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: Is there a prefix that performs from: and to: simultaneously?

Attic Hermit <[hidden email]> writes:

> Batch file of my initial tagging script includes queries like below:
>
> +john +friend -- tag:new AND from:[hidden email]
> +john +friend -- tag:new AND to:[hidden email]
>
> But I want to compress the above in one line like:
>
> +john +friend -- tag:new AND from_or_to:[hidden email]
>

How about

+john +friend -- tag:new AND (to:[hidden email] OR from:[hidden email])

?

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Attic Hermit Attic Hermit
Reply | Threaded
Open this post in threaded view
|

Re: Is there a prefix that performs from: and to: simultaneously?


> +john +friend -- tag:new AND (to:[hidden email] OR
> from:[hidden email])

First did I tried that form, but I felt that wasn't up to snuff because
I still have to write the same address two times.

--
Attic Hermit
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: Is there a prefix that performs from: and to: simultaneously?

Attic Hermit <[hidden email]> writes:

>> +john +friend -- tag:new AND (to:[hidden email] OR
>> from:[hidden email])
>
> First did I tried that form, but I felt that wasn't up to snuff because
> I still have to write the same address two times.

Currently I think that's the best you can do. You may be interested in
defining a predefined query

notmuch config query.fromtojohn "to:[hidden email] OR from:[hidden email]"

then you can use

+john +friend -- tag:new AND (to:[hidden email] OR from:[hidden email]) query:fromtojohn

Hypothetically it would be possible to extend the query: syntax to
support parameters, but I'm not sure it's worth the extra complexity.
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: Is there a prefix that performs from: and to: simultaneously?

David Bremner <[hidden email]> writes:

> Attic Hermit <[hidden email]> writes:
>
>>> +john +friend -- tag:new AND (to:[hidden email] OR
>>> from:[hidden email])
>>
>> First did I tried that form, but I felt that wasn't up to snuff because
>> I still have to write the same address two times.
>
> Currently I think that's the best you can do. You may be interested in
> defining a predefined query
>
> notmuch config query.fromtojohn "to:[hidden email] OR from:[hidden email]"
>
> then you can use
>
> +john +friend -- tag:new AND (to:[hidden email] OR from:[hidden email]) query:fromtojohn

that should be

+john +friend -- tag:new AND query:fromtojohn
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Attic Hermit Attic Hermit
Reply | Threaded
Open this post in threaded view
|

Re: Is there a prefix that performs from: and to: simultaneously?

In reply to this post by David Bremner-2
> I'm not sure it's worth the extra complexity.
Maybe you're right. I'll take the option, combinding `from' and `to'
headers to get the jobs done.

Thanks!

--
Attic Hermit
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch