[PATCH v4 5/7] Introduce _notmuch_message_has_term()
[notmuch-archives.git] / 2a / 28d84431141b5d43a0ed190f8cb6650b0e9a3d
1 Return-Path: <MarkR.Andersom@amd.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 456AE431FAE\r
6         for <notmuch@notmuchmail.org>; Thu, 17 Dec 2009 23:49:40 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id gSD+xfUT8zst for <notmuch@notmuchmail.org>;\r
11         Thu, 17 Dec 2009 23:49:38 -0800 (PST)\r
12 Received: from TX2EHSOBE008.bigfish.com (tx2ehsobe004.messaging.microsoft.com\r
13         [65.55.88.14])\r
14         by olra.theworths.org (Postfix) with ESMTP id 5BDB0431FBF\r
15         for <notmuch@notmuchmail.org>; Thu, 17 Dec 2009 23:49:38 -0800 (PST)\r
16 Received: from mail153-tx2-R.bigfish.com (10.9.14.254) by\r
17         TX2EHSOBE008.bigfish.com (10.9.40.28) with Microsoft SMTP Server id\r
18         8.1.240.5; Fri, 18 Dec 2009 07:49:37 +0000\r
19 Received: from mail153-tx2 (localhost.localdomain [127.0.0.1])  by\r
20         mail153-tx2-R.bigfish.com (Postfix) with ESMTP id 98FCADF80F6;\r
21         Fri, 18 Dec 2009 07:49:37 +0000 (UTC)\r
22 X-SpamScore: 3\r
23 X-BigFish: VPS3(zz69jzz1202hzzz32i6bh64h)\r
24 X-Spam-TCS-SCL: 3:0\r
25 Received: from mail153-tx2 (localhost.localdomain [127.0.0.1]) by mail153-tx2\r
26         (MessageSwitch) id 1261122574829996_3000;\r
27         Fri, 18 Dec 2009 07:49:34 +0000 (UTC)\r
28 Received: from TX2EHSMHS022.bigfish.com (unknown [10.9.14.236]) by\r
29         mail153-tx2.bigfish.com (Postfix) with ESMTP id 0C5265E0086;\r
30         Fri, 18 Dec 2009 07:49:04 +0000 (UTC)\r
31 Received: from ausb3extmailp02.amd.com (163.181.251.22) by\r
32         TX2EHSMHS022.bigfish.com (10.9.99.122) with Microsoft SMTP Server (TLS)\r
33         id 14.0.482.32; Fri, 18 Dec 2009 07:49:02 +0000\r
34 Received: from ausb3twp01.amd.com (ausb3twp01.amd.com [163.181.250.37]) by\r
35         ausb3extmailp02.amd.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id\r
36         nBI7mwGu019542; Fri, 18 Dec 2009 01:49:02 -0600\r
37 X-WSS-ID: 0KUU8DO-01-GPE-02\r
38 X-M-MSG: \r
39 Received: from sausexbh1.amd.com (sausexbh1.amd.com [163.181.22.101])   by\r
40         ausb3twp01.amd.com (Tumbleweed MailGate 3.7.2) with ESMTP id\r
41         23412D183F4; Fri, 18 Dec 2009 01:48:59 -0600 (CST)\r
42 Received: from sausexmb7.amd.com ([163.181.75.54]) by sausexbh1.amd.com with\r
43         Microsoft SMTPSVC(6.0.3790.3959);        Fri, 18 Dec 2009 01:49:02 -0600\r
44 Received: from optimon.amd.com ([163.181.34.104]) by sausexmb7.amd.com with\r
45         Microsoft SMTPSVC(6.0.3790.3959);        Fri, 18 Dec 2009 01:49:01 -0600\r
46 Received: from mhdc-ns01.amd.com (mhdc-ns01.amd.com [165.204.35.147])   by\r
47         optimon.amd.com (8.12.10/8.12.10) with ESMTP id nBI7n1nb022485;\r
48         Fri, 18 Dec 2009 01:49:01 -0600\r
49 Received: from testarossa.amd.com (testarossa.amd.com [165.204.147.44]) by\r
50         mhdc-ns01.amd.com (8.13.8+Sun/8.13.8) with ESMTP id nBI7n0t3023831;\r
51         Fri, 18 Dec 2009 00:49:00 -0700 (MST)\r
52 Received: (from manderso@localhost)     by testarossa.amd.com\r
53         (8.13.1/8.13.1/Submit) id nBI7n0Nn020164;\r
54         Fri, 18 Dec 2009 00:49:00 -0700\r
55 X-Authentication-Warning: testarossa.amd.com: manderso set sender to\r
56         MarkR.Andersom@amd.com using -f\r
57 From: Mark Anderson <MarkR.Anderson@amd.com>\r
58 To: cworth@cworth.org, notmuch@notmuchmail.org\r
59 Date: Fri, 18 Dec 2009 00:49:00 -0700\r
60 Message-ID: <3wdskb8oh77.fsf@testarossa.amd.com>\r
61 MIME-Version: 1.0\r
62 Content-Type: text/plain; charset="us-ascii"\r
63 X-OriginalArrivalTime: 18 Dec 2009 07:49:01.0536 (UTC)\r
64         FILETIME=[904F1E00:01CA7FB6]\r
65 X-Reverse-DNS: ausb3extmailp02.amd.com\r
66 Subject: [notmuch] Rather simple optimization for notmuch tag\r
67 X-BeenThere: notmuch@notmuchmail.org\r
68 X-Mailman-Version: 2.1.12\r
69 Precedence: list\r
70 List-Id: "Use and development of the notmuch mail system."\r
71         <notmuch.notmuchmail.org>\r
72 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
73         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
74 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
75 List-Post: <mailto:notmuch@notmuchmail.org>\r
76 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
77 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
78         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
79 X-List-Received-Date: Fri, 18 Dec 2009 07:49:40 -0000\r
80 \r
81 I was updating my poll script that tags messages, and a common idiom is\r
82 to put\r
83  tag +mytag <search_terms> and not tag:mytag\r
84 \r
85 I don't know anything about efficiency, but for the simple single-tag\r
86 case, couldn't we imply the "and not tag:mytag" from the +mytag action\r
87 list for the tag command?\r
88 \r
89 The similar (dual?, rusty math terminology, beware of Math-tetanus) case\r
90 of "tag -mytag <search-terms> and tag:mytag" could be similarly optimized,\r
91 since the tag removal action ought to be a null action in the case that\r
92 the search terms matched on a thread or message, but the tag to be\r
93 removed isn't attached to the message/thread returned.\r
94 \r
95 Any thoughts on the subject?\r
96 \r
97 -Mark\r
98 \r