finding incoming messages in threads in which i've participated [was: Re: find threads where I and Jian participated but not Dave]

Jani Nikula jani at nikula.org
Sun Aug 20 06:35:26 PDT 2017


On Mon, 26 Jun 2017, Matt Armstrong <marmstrong at google.com> wrote:
> David Bremner <david at tethera.net> writes:
>
>> Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:
>>
>>>
>>> For example, would it make sense to have "notmuch new" (and "notmuch
>>> insert") do "thread-based propagation" of specific tags?  for example,
>>> consider the following (i've just made up the config options):
>>>
>>>     notmuch config set new.from_self_tags participated
>>>     notmuch config set new.propagate_thread_tags participated
>>>
>>> the idea is that "new.from_self_tags" would be applied by "notmuch new" or
>>> "notmuch insert" if the message was explicitly from: user.primary_email
>>> or user.other_email.
>>
>> At the moment I'm more inclined to work on "doing things right" by
>> adding xapian documents (database items) for threads. Many of the
>> ideas in this thread amount to working around their absence. OTOH,
>> it's certainly true that this last idea (unlike some of the query
>> ideas) would be relatively straightforward to impliment.
>
> David, that makes a lot of sense.
>
> Take two other examples from my post-hook:
>
>     # Unmute all threads with new messages sent to me.
>     notmuch search --output=threads tag:new AND tag:me | \
>       xargs --no-run-if-empty notmuch tag -muted --
>
>     # Remove all muted threads from the inbox and mark
>     # every message in them muted.
>     notmuch search --output=threads tag:muted | \
>       xargs --no-run-if-empty notmuch tag -inbox +muted --
>
> Above I'm just operating on all the messages in a thread as a unit.  If
> notmuch had a 'database item' for each thread, I could potentially tag
> just that to achieve similar results with simpler commands.

FWIW, this is my approach to "thread tags", from my post-new hook:

# Propagate thread tags
THREAD_TAGS="muted"
for tag in $THREAD_TAGS; do
    notmuch tag +$tag $(notmuch search --output=threads tag:$tag)
done

Basically if I tag a message muted, all messages in the thread will get
the tag on next post-new.

This may or may not be related to the problems people in this thread are
trying to solve. ;)

BR,
Jani.


More information about the notmuch mailing list