Re: find threads where I and Jian participated but not Dave

Subject: Re: find threads where I and Jian participated but not Dave

Date: Tue, 13 Jun 2017 23:32:59 -0400

To: David Bremner, Xu Wang, notmuch@notmuchmail.org

Cc:

From: Brian Sniffen


David Bremner <david@tethera.net> writes:

> Xu Wang <xuwang762@gmail.com> writes:
>
>> I bump this. Actually more simple than that, how to search for thread
>> in which I have participated and Jian has participated? Excluding
>> threads in which Dave participated is perhaps more complicated.
>
> I don't know of an efficient way to do this. You could write a script
> something like
>
> notmuch search --output=threads from:Xu  > A
> notmuch search --output=threads from:Jian  > B
> comm -12 A B
>
> I think the output is sorted, but you might also have to sort A and B

I did test that part before posting mine, and the output is inverted.
--sort=oldest-first *also* gets it wrong, though in more subtle
ways. Piping through `sort -u` is the only way to be sure (I can't
imagine the -u helping, but I also can't imagine it hurting and it's
cheap). 

Thread: