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

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

Date: Sun, 20 Aug 2017 16:35:26 +0300

To: Matt Armstrong, David Bremner, Daniel Kahn Gillmor, Gaute Hope, notmuch@notmuchmail.org, Xu Wang

Cc:

From: Jani Nikula


On Mon, 26 Jun 2017, Matt Armstrong <marmstrong@google.com> wrote:
> David Bremner <david@tethera.net> writes:
>
>> Daniel Kahn Gillmor <dkg@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.
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: