Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 78F37418C36 for ; Fri, 23 Apr 2010 13:06:30 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.701 X-Spam-Level: X-Spam-Status: No, score=-0.701 tagged_above=-999 required=5 tests=[BAYES_40=-0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 75GppWM4o8pU for ; Fri, 23 Apr 2010 13:06:29 -0700 (PDT) Received: from VA3EHSOBE005.bigfish.com (va3ehsobe005.messaging.microsoft.com [216.32.180.15]) by olra.theworths.org (Postfix) with ESMTP id 65F00431FC1 for ; Fri, 23 Apr 2010 13:06:29 -0700 (PDT) Received: from mail99-va3-R.bigfish.com (10.7.14.238) by VA3EHSOBE005.bigfish.com (10.7.40.25) with Microsoft SMTP Server id 8.1.340.0; Fri, 23 Apr 2010 20:06:29 +0000 Received: from mail99-va3 (localhost.localdomain [127.0.0.1]) by mail99-va3-R.bigfish.com (Postfix) with ESMTP id 976D9F207A5; Fri, 23 Apr 2010 20:06:28 +0000 (UTC) X-SpamScore: -13 X-BigFish: VPS-13(zz1432P98dNzz1202hzz6ff19hz32i2a8h61h) X-Spam-TCS-SCL: 0:0 Received: from mail99-va3 (localhost.localdomain [127.0.0.1]) by mail99-va3 (MessageSwitch) id 1272053183400368_31086; Fri, 23 Apr 2010 20:06:23 +0000 (UTC) Received: from VA3EHSMHS023.bigfish.com (unknown [10.7.14.241]) by mail99-va3.bigfish.com (Postfix) with ESMTP id 551D71480058; Fri, 23 Apr 2010 20:06:23 +0000 (UTC) Received: from ausb3extmailp02.amd.com (163.181.251.22) by VA3EHSMHS023.bigfish.com (10.7.99.33) with Microsoft SMTP Server (TLS) id 14.0.482.44; Fri, 23 Apr 2010 20:06:21 +0000 Received: from ausb3twp01.amd.com (ausb3twp01.amd.com [163.181.250.37]) by ausb3extmailp02.amd.com (Switch-3.2.7/Switch-3.2.7) with SMTP id o3NKCbSi031253; Fri, 23 Apr 2010 15:12:40 -0500 X-WSS-ID: 0L1CIIC-01-D8T-02 X-M-MSG: Received: from sausexhtp02.amd.com (sausexhtp02.amd.com [163.181.3.152]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by ausb3twp01.amd.com (Tumbleweed MailGate 3.7.2) with ESMTP id 2609F1028A84; Fri, 23 Apr 2010 15:06:11 -0500 (CDT) Received: from optimon.amd.com (163.181.34.104) by sausexhtp02.amd.com (163.181.3.152) with Microsoft SMTP Server (TLS) id 8.2.234.1; Fri, 23 Apr 2010 15:06:15 -0500 Received: from mhdc-ns01.amd.com (mhdc-ns01.amd.com [165.204.35.147]) by optimon.amd.com (8.12.10/8.12.10) with ESMTP id o3NK6FU0001617; Fri, 23 Apr 2010 15:06:15 -0500 Received: from testarossa.amd.com (testarossa.amd.com [165.204.147.44]) by mhdc-ns01.amd.com (8.13.8+Sun/8.13.8) with ESMTP id o3NK60S5011132; Fri, 23 Apr 2010 14:06:00 -0600 (MDT) Received: (from manderso@localhost) by testarossa.amd.com (8.13.1/8.13.1/Submit) id o3NK5xKq015738; Fri, 23 Apr 2010 14:05:59 -0600 X-Authentication-Warning: testarossa.amd.com: manderso set sender to MarkR.Anderson@amd.com using -f From: Mark Anderson To: Carl Worth , Arian Kuschki , "notmuch\@notmuchmail.org" Subject: RE: [notmuch] Bulk message tagging In-Reply-To: <87eii8jtng.fsf@yoom.home.cworth.org> References: <4bc9fee0.15135e0a.2c83.ffffff35@mx.google.com> <87eii8jtng.fsf@yoom.home.cworth.org> Date: Fri, 23 Apr 2010 14:05:59 -0600 Message-ID: <3wdljceue6w.fsf@testarossa.amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Reverse-DNS: ausb3extmailp02.amd.com X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Fri, 23 Apr 2010 20:06:30 -0000 On Wed, 21 Apr 2010 18:02:59 -0500, Carl Worth wrote: > On Sat, 17 Apr 2010 20:32:27 +0200, Arian Kuschki wrote: > > So one could query with sysconf and break things up into multiple > > commands as needed. > > > > Doesn't xargs do exactly this? > > Almost. > > The arguments being passed to the "notmuch tag" command in this case > look like: > > notmuch tag -inbox thread:foo or thread:bar or ... > > To break that up, we'd have to be careful to neither leave a trailing > 'or' at the end of a command line nor to have an 'or' at the beginning > of a command line. Perhaps this hints at an opportunity to create a new operator, that you can pass as part of the notmuch commandline. Something like: cat idlist.txt | xargs notmuch tag -inbox tag:inbox and oneof: Then the list of arguments can break anywhere it wants. It's not as general as having notmuch take search terms from stdin or a file, but it seems like a long list of ID's is going to be a common case. Another problem with passing options to xarg is that any parentheses are going to break easily. Actually, looking at this random proposal, you can see the invented operator has an implicit grouping semantic, which leads to all kinds of confusion. -Mark