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

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sun Jun 25 08:46:21 PDT 2017


Hey all--

I really appreciate the thought and experimentation and research that's
gone into this thread!

On Thu 2017-06-22 17:00:58 -0700, Matt Armstrong wrote:
> # All threads in which I participate get tag:participated
> #  1) Find all threads with a message tagged new
> #     (finding all 'today' messages helps during testing,
> #     but isn't necessary)
> #  2) Run through "xargs -s 2048 echo" to to group threads
> #     lines of about 2K in size.
> #  3) For each line (2) produces, narrow the threads to
> #     those containing a message from me.
> #  4) For each such thread, tag every message with +participated.
> notmuch search --output=threads tag:new OR date:today | \
>   xargs -s 2048 echo | \
>   xargs -I '{}' notmuch search \
>   --output=threads from:marmstrong AND \( '{}' \) | \
>   sed -e 's,^,+participated -- ,' | \
>   notmuch tag --batch

This makes sense to me, modulo the split into 2048-octet lines (magic
numbers make me nervous, though i think i understand why you've included
it).

That said, i've been trying to think lately about how to make notmuch a
tool that's usable by normal humans, who probably won't want to
understand all the moving pieces here.  I don't want yet another MUA
that requires you to edit a turing-complete config file to get useful
functionality -- we already have mutt for that :)

Is there a way that we can push this idea/functionality further into
the core of notmuch in a way that makes it easier to use?

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.

and additionally, if a message was inserted into a thread which has any
of the new.propagated_thread_tags applied, the new message would also
get those tags.

What do y'all think?

    --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20170625/cd47b206/attachment.sig>


More information about the notmuch mailing list