From 500214250751c72831e2f0dea9a9d6900c23dcdb Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Sun, 15 Apr 2012 12:07:54 +1700 Subject: [PATCH] Re: [PATCH 5/8] emacs: modify search tag functions to use new notmuch-tag interface --- 77/1682b97c5d1a2753569cd50bdd1a2c3a783091 | 121 ++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 77/1682b97c5d1a2753569cd50bdd1a2c3a783091 diff --git a/77/1682b97c5d1a2753569cd50bdd1a2c3a783091 b/77/1682b97c5d1a2753569cd50bdd1a2c3a783091 new file mode 100644 index 000000000..2651de652 --- /dev/null +++ b/77/1682b97c5d1a2753569cd50bdd1a2c3a783091 @@ -0,0 +1,121 @@ +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 E9504431FBD + for ; Sat, 14 Apr 2012 12:08:00 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.29 +X-Spam-Level: +X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] autolearn=disabled +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 1ObXVJzWH16d for ; + Sat, 14 Apr 2012 12:08:00 -0700 (PDT) +Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu + [131.215.239.19]) + by olra.theworths.org (Postfix) with ESMTP id 8008A431FAF + for ; Sat, 14 Apr 2012 12:08:00 -0700 (PDT) +Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) + by fire-doxen-postvirus (Postfix) with ESMTP id 315942E50D97; + Sat, 14 Apr 2012 12:08:00 -0700 (PDT) +X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new +Received: from finestructure.net (unknown [76.89.193.65]) + (Authenticated sender: jrollins) + by fire-doxen-submit (Postfix) with ESMTP id 6088B2E50D8C; + Sat, 14 Apr 2012 12:07:57 -0700 (PDT) +Received: by finestructure.net (Postfix, from userid 1000) + id EF53745D; Sat, 14 Apr 2012 12:07:56 -0700 (PDT) +From: Jameson Graef Rollins +To: Mark Walters , + Notmuch Mail +Subject: Re: [PATCH 5/8] emacs: modify search tag functions to use new + notmuch-tag interface +In-Reply-To: <871unwn40g.fsf@qmul.ac.uk> +References: <1333354853-25729-1-git-send-email-jrollins@finestructure.net> + <1333845338-22960-1-git-send-email-jrollins@finestructure.net> + <1333845338-22960-2-git-send-email-jrollins@finestructure.net> + <1333845338-22960-3-git-send-email-jrollins@finestructure.net> + <1333845338-22960-4-git-send-email-jrollins@finestructure.net> + <1333845338-22960-5-git-send-email-jrollins@finestructure.net> + <1333845338-22960-6-git-send-email-jrollins@finestructure.net> + <871unwn40g.fsf@qmul.ac.uk> +User-Agent: Notmuch/0.12+112~gffb05d6 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Sat, 14 Apr 2012 12:07:54 -0700 +Message-ID: <871unq169h.fsf@servo.finestructure.net> +MIME-Version: 1.0 +Content-Type: multipart/signed; boundary="=-=-="; + micalg=pgp-sha256; protocol="application/pgp-signature" +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: Sat, 14 Apr 2012 19:08:01 -0000 + +--=-=-= + +On Mon, Apr 09 2012, Mark Walters wrote: +> My only comment here is that I wonder about the tag-all command. I can +> see that this is a performance win over applying tag region to the whole +> buffer but is it another place where we have a race with incoming mail +> (ie we tag everything that now matches rather than everything in the +> buffer). + +Yes, I think this is a problem. notmuch-{search,show}-tag-all are both +subject to race conditions. I suggest we remove notmuch-search-tag-all +in favor of the region tagging capabilities of notmuch-show-tag. I will +submit a patch for that. notmuch-show-tag-all is trickier, since there +no tag-by-region capability at the moment. That will have to be added +before this function can be replaced. + +> A second advantage with the tag-region form is that it automatically +> does excludes. Currently notmuch-tag does not do excludes as it looked +> very hairy to implement correctly: thus the tag-all command could spend +> a lot of time tagging excluded messages. + +Actually, I don't think this is true, at least for search mode. In +search mode threads are tagged by their thread id, therefore any +excluded messages in the thread will receive the same tagging +operations. + +The current operation is at least, in my opinion, self consistent. If +we're going to tag by thread then all messages in the thread should be +tagged, whether or not they're excluded. I do think, however, that it +might be nice to add a tagging function that only tags the matching +messages in the thread. In that case excluded messages would not be +tagged. That's for future work, though. + +jamie. + +--=-=-= +Content-Type: application/pgp-signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.12 (GNU/Linux) + +iQIcBAEBCAAGBQJPicsKAAoJEO00zqvie6q8cZEQALmcO+ZmVhRNpyJBxPVldp9E +LI+uT+DJNAHhaH5M+WuJDBJmFl232uG8wFrhcmwoLgK2WvJx8LmU4W9YGAafwgEz +5HC8OoS3ybc6XvdALZRAoyvy/2FFboNN2tEbO9B7tBPNhyuDRs4iH6ZmCu74kMsA +PztaFT7kPC7+zuiS7TxWxShLvnh/0rw9TrOvyW2L4031F9XeuphyUvWkSeJjRx8w +HB69URfnaQBmP4PbNZz9ShiIOIMle5WPtqlpcxymcNg6wX05XxaLqGdJeKVrILLc +TyZW1/rXY1YWicO0KRJ4GaaEDXjrsRrlxKXXyUvvMhUWoGVMlWQiUv2CK7VwltKb +ecIgb1fmc1q03VPbg+HSOmivMcBMA+2iwBN55q0PHCy112y0pFl3dqOOy59EWKfg +2yVqHh2aqXE7SK1dpqcZCQCeTWX092fKCMP5UsgNkqLR2jUtCz3bdy0t+N4/6XE0 +/NXtfOHeCVF2EZkImmoDmQQBqYk1X3x0dnKMT9VyHt/JzMuZJJQtRyB7l34KWw34 +jxaQPA5uqbdE9ZQdzfC6G0EcKZ2UZDccgf/ALrkfx+JG0kJjcr7NxRXpZVEWzz2F +wnY9d5+gUBr7VOG052KPmtGCojOKECQNmfXHgjv+fRJIYjUHWT/iVFL7NCXq0VtZ +164UfBKVzATHxe5WKFqc +=q9b+ +-----END PGP SIGNATURE----- +--=-=-=-- -- 2.26.2