1 Return-Path: <five9a2@gmail.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 033D1431FBC
\r
6 for <notmuch@notmuchmail.org>; Thu, 26 Nov 2009 13:36:22 -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 FdsgtILhFJ0W for <notmuch@notmuchmail.org>;
\r
11 Thu, 26 Nov 2009 13:36:20 -0800 (PST)
\r
12 Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com
\r
14 by olra.theworths.org (Postfix) with ESMTP id 601A8431FC0
\r
15 for <notmuch@notmuchmail.org>; Thu, 26 Nov 2009 13:36:20 -0800 (PST)
\r
16 Received: by mail-bw0-f224.google.com with SMTP id 24so847011bwz.30
\r
17 for <notmuch@notmuchmail.org>; Thu, 26 Nov 2009 13:36:20 -0800 (PST)
\r
18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
19 h=domainkey-signature:received:received:sender:from:to:cc:subject
\r
20 :date:message-id:x-mailer:in-reply-to:references;
\r
21 bh=2dfJTdVQ551MKyhE7t2bemrqMl/vZY0CfvdVmcnvq34=;
\r
22 b=sL3t++975jLGFEt06oC9BXDrZcNXupkkLcDn3TLShbZShznZAqI0PylBA+t8k91fMU
\r
23 xZBTimvQA094e+RglmTZ3996+7GLhKSFTZBMuWNITYgN7KGF7w5sG6ymJRjesCpatIIu
\r
24 jpc5j9Ku+Oi+ZzAK37RrSbCC4ESAt/4zNZmbc=
\r
25 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
\r
26 h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to
\r
28 b=jPxDvJXNNpqdyU8ZoQ6n0KDWWqWWqtPfyC8GoWGrmzWpfjJ1YcFHMIt3Tk//MJj28D
\r
29 /jG2hLOukChMYDqmaP8Ti5puDjP53mRcmImat3coCkAazPtGWzuojLxtWc/nT5VZB3CP
\r
30 2Gf11ptYMHoaHMH6GoWQm1z8BRdOOy0x79OM4=
\r
31 Received: by 10.204.33.140 with SMTP id h12mr243127bkd.167.1259271380040;
\r
32 Thu, 26 Nov 2009 13:36:20 -0800 (PST)
\r
33 Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11])
\r
34 by mx.google.com with ESMTPS id p9sm1421100fkb.14.2009.11.26.13.36.18
\r
35 (version=TLSv1/SSLv3 cipher=RC4-MD5);
\r
36 Thu, 26 Nov 2009 13:36:19 -0800 (PST)
\r
37 Sender: Jed Brown <five9a2@gmail.com>
\r
38 From: Jed Brown <jed@59A2.org>
\r
39 To: cworth@cworth.org
\r
40 Date: Thu, 26 Nov 2009 22:36:50 +0100
\r
41 Message-Id: <1259271410-15336-2-git-send-email-jed@59A2.org>
\r
42 X-Mailer: git-send-email 1.6.5.3
\r
43 In-Reply-To: <1259271410-15336-1-git-send-email-jed@59A2.org>
\r
44 References: <87pr75q9va.fsf@yoom.home.cworth.org>
\r
45 <1259271410-15336-1-git-send-email-jed@59A2.org>
\r
46 Cc: notmuch@notmuchmail.org
\r
47 Subject: [notmuch] [PATCH 2/2] notmuch-search-add/remove-tag: restrict to
\r
48 messages in current query
\r
49 X-BeenThere: notmuch@notmuchmail.org
\r
50 X-Mailman-Version: 2.1.12
\r
52 List-Id: "Use and development of the notmuch mail system."
\r
53 <notmuch.notmuchmail.org>
\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
57 List-Post: <mailto:notmuch@notmuchmail.org>
\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
61 X-List-Received-Date: Thu, 26 Nov 2009 21:36:22 -0000
\r
63 Rather than tagging the everything in the thread. This is arguably more
\r
64 desirable behavior and is consistent with clearly desirably behavior of
\r
65 notmuch-search-operate-all.
\r
67 Note that this change applies indirectly to
\r
68 notmuch-search-archive-thread (which is actually equivalent behavior
\r
69 since this function is primarily used when browsing an inbox).
\r
71 Signed-off-by: Jed Brown <jed@59A2.org>
\r
73 notmuch.el | 8 ++++++--
\r
74 1 files changed, 6 insertions(+), 2 deletions(-)
\r
76 diff --git a/notmuch.el b/notmuch.el
\r
77 index 6adac9e..e9786c0 100644
\r
80 @@ -935,15 +935,19 @@ and will also appear in a buffer named \"*Notmuch errors*\"."
\r
81 (split-string (buffer-substring beg end))))))
\r
83 (defun notmuch-search-add-tag (tag)
\r
84 + "Add a tag to messages in the current thread matching the
\r
87 (list (notmuch-select-tag-with-completion "Tag to add: ")))
\r
88 - (notmuch-call-notmuch-process "tag" (concat "+" tag) (notmuch-search-find-thread-id))
\r
89 + (notmuch-call-notmuch-process "tag" (concat "+" tag) (notmuch-search-find-thread-id) " and " notmuch-search-query-string)
\r
90 (notmuch-search-set-tags (delete-dups (sort (cons tag (notmuch-search-get-tags)) 'string<))))
\r
92 (defun notmuch-search-remove-tag (tag)
\r
93 + "Remove a tag from messages in the current thread matching the
\r
96 (list (notmuch-select-tag-with-completion "Tag to remove: " (notmuch-search-find-thread-id))))
\r
97 - (notmuch-call-notmuch-process "tag" (concat "-" tag) (notmuch-search-find-thread-id))
\r
98 + (notmuch-call-notmuch-process "tag" (concat "-" tag) (notmuch-search-find-thread-id) " and " notmuch-search-query-string)
\r
99 (notmuch-search-set-tags (delete tag (notmuch-search-get-tags))))
\r
101 (defun notmuch-search-archive-thread ()
\r