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

Matt Armstrong marmstrong at google.com
Mon Jun 26 13:49:50 PDT 2017


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.

It has some subtle implications.  E.g. when I tag through a particular
UI do I mean to tag a particular message or the thread?  Is it worth
making the user think about the difference?  Is there some way to
express this such that they never do?  Are some tags configured to
always apply to the thread?  Are these the only tags that do?  Or do
"thread tags" always contain the union of all associated message tags?

Fun stuff.  :)


More information about the notmuch mailing list