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 456AE431FAE for ; Thu, 17 Dec 2009 23:49:40 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 gSD+xfUT8zst for ; Thu, 17 Dec 2009 23:49:38 -0800 (PST) Received: from TX2EHSOBE008.bigfish.com (tx2ehsobe004.messaging.microsoft.com [65.55.88.14]) by olra.theworths.org (Postfix) with ESMTP id 5BDB0431FBF for ; Thu, 17 Dec 2009 23:49:38 -0800 (PST) Received: from mail153-tx2-R.bigfish.com (10.9.14.254) by TX2EHSOBE008.bigfish.com (10.9.40.28) with Microsoft SMTP Server id 8.1.240.5; Fri, 18 Dec 2009 07:49:37 +0000 Received: from mail153-tx2 (localhost.localdomain [127.0.0.1]) by mail153-tx2-R.bigfish.com (Postfix) with ESMTP id 98FCADF80F6; Fri, 18 Dec 2009 07:49:37 +0000 (UTC) X-SpamScore: 3 X-BigFish: VPS3(zz69jzz1202hzzz32i6bh64h) X-Spam-TCS-SCL: 3:0 Received: from mail153-tx2 (localhost.localdomain [127.0.0.1]) by mail153-tx2 (MessageSwitch) id 1261122574829996_3000; Fri, 18 Dec 2009 07:49:34 +0000 (UTC) Received: from TX2EHSMHS022.bigfish.com (unknown [10.9.14.236]) by mail153-tx2.bigfish.com (Postfix) with ESMTP id 0C5265E0086; Fri, 18 Dec 2009 07:49:04 +0000 (UTC) Received: from ausb3extmailp02.amd.com (163.181.251.22) by TX2EHSMHS022.bigfish.com (10.9.99.122) with Microsoft SMTP Server (TLS) id 14.0.482.32; Fri, 18 Dec 2009 07:49:02 +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 ESMTP id nBI7mwGu019542; Fri, 18 Dec 2009 01:49:02 -0600 X-WSS-ID: 0KUU8DO-01-GPE-02 X-M-MSG: Received: from sausexbh1.amd.com (sausexbh1.amd.com [163.181.22.101]) by ausb3twp01.amd.com (Tumbleweed MailGate 3.7.2) with ESMTP id 23412D183F4; Fri, 18 Dec 2009 01:48:59 -0600 (CST) Received: from sausexmb7.amd.com ([163.181.75.54]) by sausexbh1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 18 Dec 2009 01:49:02 -0600 Received: from optimon.amd.com ([163.181.34.104]) by sausexmb7.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 18 Dec 2009 01:49:01 -0600 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 nBI7n1nb022485; Fri, 18 Dec 2009 01:49:01 -0600 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 nBI7n0t3023831; Fri, 18 Dec 2009 00:49:00 -0700 (MST) Received: (from manderso@localhost) by testarossa.amd.com (8.13.1/8.13.1/Submit) id nBI7n0Nn020164; Fri, 18 Dec 2009 00:49:00 -0700 X-Authentication-Warning: testarossa.amd.com: manderso set sender to MarkR.Andersom@amd.com using -f From: Mark Anderson To: cworth@cworth.org, notmuch@notmuchmail.org Date: Fri, 18 Dec 2009 00:49:00 -0700 Message-ID: <3wdskb8oh77.fsf@testarossa.amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-OriginalArrivalTime: 18 Dec 2009 07:49:01.0536 (UTC) FILETIME=[904F1E00:01CA7FB6] X-Reverse-DNS: ausb3extmailp02.amd.com Subject: [notmuch] Rather simple optimization for notmuch tag X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 18 Dec 2009 07:49:40 -0000 I was updating my poll script that tags messages, and a common idiom is to put tag +mytag and not tag:mytag I don't know anything about efficiency, but for the simple single-tag case, couldn't we imply the "and not tag:mytag" from the +mytag action list for the tag command? The similar (dual?, rusty math terminology, beware of Math-tetanus) case of "tag -mytag and tag:mytag" could be similarly optimized, since the tag removal action ought to be a null action in the case that the search terms matched on a thread or message, but the tag to be removed isn't attached to the message/thread returned. Any thoughts on the subject? -Mark