1 Return-Path: <pieter@praet.org>
\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 4CD1C431FB6
\r
6 for <notmuch@notmuchmail.org>; Sat, 16 Apr 2011 05:59:41 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id PL90WIdPy5VQ for <notmuch@notmuchmail.org>;
\r
16 Sat, 16 Apr 2011 05:59:39 -0700 (PDT)
\r
17 Received: from mail-ww0-f41.google.com (mail-ww0-f41.google.com
\r
18 [74.125.82.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
19 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
20 410E4431FB5 for <notmuch@notmuchmail.org>; Sat, 16 Apr 2011 05:59:39 -0700
\r
22 Received: by wwi18 with SMTP id 18so432829wwi.2
\r
23 for <notmuch@notmuchmail.org>; Sat, 16 Apr 2011 05:59:38 -0700 (PDT)
\r
24 Received: by 10.227.61.146 with SMTP id t18mr2981489wbh.189.1302958777837;
\r
25 Sat, 16 Apr 2011 05:59:37 -0700 (PDT)
\r
26 Received: from localhost (99.28-240-81.adsl-dyn.isp.belgacom.be
\r
27 [81.240.28.99]) by mx.google.com with ESMTPS id
\r
28 bd8sm2157860wbb.48.2011.04.16.05.59.35 (version=TLSv1/SSLv3 cipher=OTHER);
\r
29 Sat, 16 Apr 2011 05:59:36 -0700 (PDT)
\r
30 From: Pieter Praet <pieter@praet.org>
\r
31 To: Florian Friesdorf <flo@chaoflow.net>, notmuch@notmuchmail.org
\r
32 Subject: Re: Optimization for notmuch tag by implicit filters
\r
33 In-Reply-To: <87y63d6y25.fsf@eve.chaoflow.net>
\r
34 References: <87y63d6y25.fsf@eve.chaoflow.net>
\r
35 User-Agent: Notmuch/0.5-86-g4875299 (http://notmuchmail.org) Emacs/23.1.50.1
\r
36 (x86_64-pc-linux-gnu)
\r
37 Date: Sat, 16 Apr 2011 14:59:34 +0200
\r
39 <87mxjqgxmx.fsf@A7GMS.i-did-not-set--mail-host-address--so-tickle-me>
\r
41 Content-Type: text/plain; charset=us-ascii
\r
42 X-BeenThere: notmuch@notmuchmail.org
\r
43 X-Mailman-Version: 2.1.13
\r
45 List-Id: "Use and development of the notmuch mail system."
\r
46 <notmuch.notmuchmail.org>
\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
50 List-Post: <mailto:notmuch@notmuchmail.org>
\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
54 X-List-Received-Date: Sat, 16 Apr 2011 12:59:41 -0000
\r
56 On Thu, 14 Apr 2011 10:23:46 +0200, Florian Friesdorf <flo@chaoflow.net> wrote:
\r
58 > With 60k messages and 12k tagged as sent:
\r
60 > $ time notmuch tag +sent -- from:flo@chaoflow.net
\r
66 > $ time notmuch tag +sent -- from:flo@chaoflow.net and not tag:sent
\r
73 > This could be made implicit:
\r
75 > notmuch tag +A +B -- <filter>
\r
77 > notmuch tag +A +B -- <filter> and not \(tag:A and tag:B\)
\r
79 > Apply command, if one of the tags is not set.
\r
82 > notmuch tag -C -D -- <filter>
\r
84 > notmuch tag -C -D -- <filter> and \(tag:C or tag:D\)
\r
86 > Apply command, if one of the tags is set.
\r
89 > notmuch tag +A +B -C -D -- <filter>
\r
91 > notmuch tag +A +B -C -D -- <filter> and \(not tag:A or not tag:B\ or tag:C or tag:D\)
\r
94 > In order to enforce tagging and disable the filter there could be a
\r
97 > I lack the knowledge/time to implement it, but I think it's at least
\r
98 > worth documenting it.
\r
101 > Florian Friesdorf <flo@chaoflow.net>
\r
102 > GPG FPR: 7A13 5EEE 1421 9FC2 108D BAAF 38F8 99A3 0C45 F083
\r
103 > Jabber/XMPP: flo@chaoflow.net
\r
104 > IRC: chaoflow on freenode,ircnet,blafasel,OFTC
\r
105 Non-text part: application/pgp-signature
\r
106 > _______________________________________________
\r
107 > notmuch mailing list
\r
108 > notmuch@notmuchmail.org
\r
109 > http://notmuchmail.org/mailman/listinfo/notmuch
\r
112 Most of us already do this explicitly in our tagging scripts, so no harm
\r
113 in making it standard behaviour, I guess.
\r
115 Though to keep the implementation nice & clean, I'd advise against the
\r
116 use of parens: no need for escape chars, no messing with De Morgan's
\r
117 law, simply map the tag operations to their inverse in conjunctively
\r
120 notmuch tag +A +B -- <filter> and not tag:A or not tag:B
\r
121 notmuch tag -C -D -- <filter> and tag:C or tag:D
\r
122 notmuch tag +A +B -C -D -- <filter> and not tag:A or not tag:B or tag:C or tag:D
\r