find threads where I and Jian participated but not Dave
Matt Armstrong
marmstrong at google.com
Thu Jun 22 13:15:38 PDT 2017
Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:
> On Wed 2017-06-21 13:04:53 -0700, Matt Armstrong wrote:
>> For what it is worth, I've found this idea from Daniel intriguing and
>> pretty useful in practice:
>>
>> "show me threads in which i've participated, where there are some
>> messages flagged with 'inbox'"
>>
>> I implement it like this in my post-new hook:
>>
>> # All messages in threads in which I participate get tag:participated
>> notmuch search --output=threads from:marmstrong | \
>> sed -e 's,^,+participated -- ,' | \
>> notmuch tag --batch
>
> cool, thx for the suggestion.
>
> the "notmuch search" part of the pipeline alone takes ~19s (wall time,
> and actual CPU time) for me though :/ It returns 30504 threads! how
> many threads do you get?
The query returns 6600 threads. I'm getting 2 seconds wall clock time.
> you're effectively re-tagging every single message in every participated
> thread every time you run "notmuch new", right?
Yeah, the "batch script" that the above search+sed creates and pipes
into "notmuch tag --batch" is 265K, but it only takes 0.5 seconds to
execute. My understanding is that "notmuch tag" is smart enough to do
no work if the tag is already present on a message, so the only changes
happening in the database are actually for new stuff.
More information about the notmuch
mailing list