From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 0159F6DE00F5 for ; Tue, 13 Jun 2017 20:40:00 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.529 X-Spam-Level: X-Spam-Status: No, score=0.529 tagged_above=-999 required=5 tests=[AWL=-0.104, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_SBL=0.644, URIBL_SBL_A=0.1] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZdsBDV-tQKCb for ; Tue, 13 Jun 2017 20:39:57 -0700 (PDT) X-Greylist: delayed 413 seconds by postgrey-1.36 at arlo; Tue, 13 Jun 2017 20:39:57 PDT Received: from istari.evenmere.org (istari.evenmere.org [136.248.125.194]) by arlo.cworth.org (Postfix) with ESMTP id 354EE6DE0008 for ; Tue, 13 Jun 2017 20:39:57 -0700 (PDT) Received: by istari.evenmere.org (Postfix, from userid 1000) id 18CEB1E01A0; Tue, 13 Jun 2017 23:32:59 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=evenmere.org; s=default; t=1497411179; bh=+t2zyARU1sgi6MB6iqvA+aOoc0LsZMpVw23+Omajmb0=; h=From:To:Subject:In-Reply-To:References:Date:From; b=II7B0UDqgLRv5r7UE0/g5A2p7BD6+ljJUp89+B7FVadlboDIDvWSy0Fz6eDHEpMKZ Aq3bYR1dPkdJNO5nu3sIn2C/Drb/OnoWYdRfQXk7P82oCQ3CPprrimJHysWjWzCIMK o7IfGyma8lzYg5DlTqzDag8J7K9NQAHYRsXacWxQ= From: Brian Sniffen To: David Bremner , Xu Wang , notmuch@notmuchmail.org Subject: Re: find threads where I and Jian participated but not Dave In-Reply-To: <87bmprtqgo.fsf@tethera.net> References: <87bmprtqgo.fsf@tethera.net> Date: Tue, 13 Jun 2017 23:32:59 -0400 Message-ID: <87d1a76y6s.fsf@istari.evenmere.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jun 2017 03:40:00 -0000 David Bremner writes: > Xu Wang 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).