1 Return-Path: <cworth@cworth.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 56D35431FBF;
\r
6 Fri, 18 Dec 2009 09:39:11 -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 TIPMgAMxrsT8; Fri, 18 Dec 2009 09:39:10 -0800 (PST)
\r
11 Received: from yoom.home.cworth.org (localhost [127.0.0.1])
\r
12 by olra.theworths.org (Postfix) with ESMTP id 6DAF3431FAE;
\r
13 Fri, 18 Dec 2009 09:39:10 -0800 (PST)
\r
14 Received: by yoom.home.cworth.org (Postfix, from userid 1000)
\r
15 id 36B44254306; Fri, 18 Dec 2009 09:39:10 -0800 (PST)
\r
16 From: Carl Worth <cworth@cworth.org>
\r
17 To: Mark Anderson <MarkR.Anderson@amd.com>, notmuch@notmuchmail.org
\r
18 In-Reply-To: <3wdskb8oh77.fsf@testarossa.amd.com>
\r
19 References: <3wdskb8oh77.fsf@testarossa.amd.com>
\r
20 Date: Fri, 18 Dec 2009 09:39:09 -0800
\r
21 Message-ID: <87hbroyyf6.fsf@yoom.home.cworth.org>
\r
23 Content-Type: multipart/signed; boundary="=-=-=";
\r
24 micalg=pgp-sha1; protocol="application/pgp-signature"
\r
25 Subject: Re: [notmuch] Rather simple optimization for notmuch tag
\r
26 X-BeenThere: notmuch@notmuchmail.org
\r
27 X-Mailman-Version: 2.1.12
\r
29 List-Id: "Use and development of the notmuch mail system."
\r
30 <notmuch.notmuchmail.org>
\r
31 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
32 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
33 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
34 List-Post: <mailto:notmuch@notmuchmail.org>
\r
35 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
36 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
37 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
38 X-List-Received-Date: Fri, 18 Dec 2009 17:39:11 -0000
\r
41 Content-Transfer-Encoding: quoted-printable
\r
43 On Fri, 18 Dec 2009 00:49:00 -0700, Mark Anderson <MarkR.Anderson@amd.com> =
\r
45 > I was updating my poll script that tags messages, and a common idiom is
\r
47 > tag +mytag <search_terms> and not tag:mytag
\r
49 > I don't know anything about efficiency, but for the simple single-tag
\r
50 > case, couldn't we imply the "and not tag:mytag" from the +mytag action
\r
51 > list for the tag command?
\r
53 On one level, it really shouldn't be a performance issue to tag messages
\r
54 that already have a particular tag. (And in fact, the recently proposed
\r
55 patches to fix Xapian defect 250 even address this I think.)
\r
57 In the meantime, it is fairly annoying to have to type this, and yes,
\r
58 the tag command could infer that and append it to the search string
\r
59 automatically. That's a good idea, really.
\r
61 > The similar (dual?, rusty math terminology, beware of Math-tetanus) case
\r
62 > of "tag -mytag <search-terms> and tag:mytag" could be similarly optimized,
\r
63 > since the tag removal action ought to be a null action in the case that
\r
64 > the search terms matched on a thread or message, but the tag to be
\r
65 > removed isn't attached to the message/thread returned.
\r
67 Yes, that would work too.
\r
69 One potential snag with both ideas is that the "notmuch tag"
\r
70 command-line as currently implemented allows for multiple tag additions
\r
71 and removals with a single search. So the optimization here couldn't be
\r
72 used unless there was just a single tag action.
\r
74 So that's another reason to really just want the lower-level
\r
75 optimization to be in place.
\r
81 Content-Type: application/pgp-signature
\r
83 -----BEGIN PGP SIGNATURE-----
\r
84 Version: GnuPG v1.4.10 (GNU/Linux)
\r
86 iD8DBQFLK74+6JDdNq8qSWgRAnO2AJ9yqhPa23LeXMRc5oYUEpbkP4JsrQCeOHPR
\r
87 2AyrmAB07iysMn0XGTHcffw=
\r
89 -----END PGP SIGNATURE-----
\r