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 76A9F6DE1824 for ; Mon, 26 Jun 2017 13:54:14 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.319 X-Spam-Level: X-Spam-Status: No, score=-0.319 tagged_above=-999 required=5 tests=[AWL=-0.188, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 L3O32-7j1WZn for ; Mon, 26 Jun 2017 13:54:12 -0700 (PDT) Received: from mail-pg0-f52.google.com (mail-pg0-f52.google.com [74.125.83.52]) by arlo.cworth.org (Postfix) with ESMTPS id AC76E6DE1658 for ; Mon, 26 Jun 2017 13:54:11 -0700 (PDT) Received: by mail-pg0-f52.google.com with SMTP id j186so5446407pge.2 for ; Mon, 26 Jun 2017 13:54:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=7i6N1E+yEsefUrgrwE63yNehk6BdRNmdfbieWwIkjEY=; b=nBtykt3fyHRa9H0I7tsPiAGNhnielw5cUyrjduYxpYw6klbaBmZ62Qq5MtnhMk7zWw MDE1rsqSSHBXvwVGJJO2YyT87jTmuSO+pJQHRGLruiDQWj+ayZM1P4uD7ROw4aPBKXVc vEudkhXUKREfgKH5396aq+l101Y187lOUEfccXKCV8w6TGCx9Z8dDBa/OlYIo3YGyhpc 4B1JNeGqnGTaIdvlaZtiB9w7VzQycE2HYG4w9kke9EhzNqpIhjrnNL2n2QCJ0h+tCkvG llcC3ltU+jtyTKZrPjkolzAUyXLGPKylW8cWdR418FCLb+JQaHUpxA3pcZgc99xdMHS7 lKdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=7i6N1E+yEsefUrgrwE63yNehk6BdRNmdfbieWwIkjEY=; b=XfrfnliuAqezvlsPRqQvgVZ6HaHNDsqkPwx5eVEQbaAWU4/GfW/QO+GesHOgBkM0RH 28MnDb0b3ZfZChIiCxrZ810E33Bzir87L61VO9kUrhzEUAKB/GZPf4iYTni9P4cPNVu4 R8AD3aWXvqt1Gzs5gfh6+QmbRPxTZuYklrPHlFhjthIVn7c2pkGEUjJxbC+fFHk28E73 FTg+0Io/GZn5vqpUilwrXR4I6x1j0ThW0iwiXs6Gm9yZUFHgxeY+UjjuAThFo64Vc9SQ hfXkuIFF03rvTXYeL+mFa6n3XV5xe6KOzBMvY2QZWqTmXJBGTNlymrRgkQZkA9RvhwQt iUMg== X-Gm-Message-State: AKS2vOxtA5ICbyBoombrOFMoW0i/S/1hdXl2YzpmJ2gz4NA+CS3blQ0U 6sKQ/QWNXHjUcA1A X-Received: by 10.99.127.76 with SMTP id p12mr1894887pgn.258.1498510450771; Mon, 26 Jun 2017 13:54:10 -0700 (PDT) Received: from marmstrong-linux.kir.corp.google.com ([2620:0:1008:11:ed09:69a4:df9d:fb34]) by smtp.gmail.com with ESMTPSA id l63sm1690316pfc.132.2017.06.26.13.54.09 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 26 Jun 2017 13:54:09 -0700 (PDT) From: Matt Armstrong To: Daniel Kahn Gillmor , Gaute Hope , David Bremner , notmuch@notmuchmail.org, Xu Wang Subject: Re: finding incoming messages in threads in which i've participated [was: Re: find threads where I and Jian participated but not Dave] In-Reply-To: <87efu8t6ia.fsf@fifthhorseman.net> References: <87bmprtqgo.fsf@tethera.net> <87fuf1nnl5.fsf@fifthhorseman.net> <8737b1rojw.fsf@tethera.net> <1497594312.ahjx44w937.astroid@strange.none> <87r2ydgh9t.fsf@fifthhorseman.net> <1498111587.9x086zp6wn.astroid@strange.none> <1498112439.apimm1pnum.astroid@strange.none> <87efu8t6ia.fsf@fifthhorseman.net> Date: Mon, 26 Jun 2017 13:54:08 -0700 Message-ID: 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: Mon, 26 Jun 2017 20:54:14 -0000 Daniel Kahn Gillmor writes: > 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). Yes, the two xargs commands and "2048 business" is just a hack to work around the documented limitations of "xargs -I". I'd love to come up with a simpler way to do this. I suspect there is one, but when it comes to this kind of Unix shell hackery, I usually stop once I get to something that works. :)