1 Return-Path: <dme@dme.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 EC741431FD2
\r
6 for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 02:47:54 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\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 txkKXuFotI8t for <notmuch@notmuchmail.org>;
\r
16 Wed, 25 Jan 2012 02:47:54 -0800 (PST)
\r
17 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com
\r
18 [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 197E4431FBC
\r
21 for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 02:47:53 -0800 (PST)
\r
22 Received: by wibhi8 with SMTP id hi8so2360067wib.26
\r
23 for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 02:47:53 -0800 (PST)
\r
24 Received: by 10.180.80.164 with SMTP id s4mr468672wix.22.1327488471171;
\r
25 Wed, 25 Jan 2012 02:47:51 -0800 (PST)
\r
26 Received: from hotblack-desiato.hh.sledj.net
\r
27 (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])
\r
28 by mx.google.com with ESMTPS id fr8sm70280wib.10.2012.01.25.02.47.48
\r
29 (version=TLSv1/SSLv3 cipher=OTHER);
\r
30 Wed, 25 Jan 2012 02:47:50 -0800 (PST)
\r
31 Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)
\r
32 id 6B0A59FE67; Wed, 25 Jan 2012 10:47:47 +0000 (GMT)
\r
33 To: Jameson Graef Rollins <jrollins@finestructure.net>,
\r
34 Notmuch Mail <notmuch@notmuchmail.org>
\r
35 Subject: Re: [PATCH v3 2/8] emacs: break up
\r
36 notmuch-show-archive-thread-internal into two more generally
\r
38 In-Reply-To: <1327449983-23638-3-git-send-email-jrollins@finestructure.net>
\r
39 References: <87pqea24z0.fsf@servo.finestructure.net>
\r
40 <1327449983-23638-1-git-send-email-jrollins@finestructure.net>
\r
41 <1327449983-23638-2-git-send-email-jrollins@finestructure.net>
\r
42 <1327449983-23638-3-git-send-email-jrollins@finestructure.net>
\r
43 User-Agent: Notmuch/0.11+109~g03934e4 (http://notmuchmail.org) Emacs/24.0.92.1
\r
44 (x86_64-pc-linux-gnu)
\r
45 From: David Edmondson <dme@dme.org>
\r
46 Date: Wed, 25 Jan 2012 10:47:47 +0000
\r
47 Message-ID: <cun7h0gnjn0.fsf@hotblack-desiato.hh.sledj.net>
\r
49 Content-Type: multipart/signed; boundary="=-=-=";
\r
50 micalg=pgp-sha1; protocol="application/pgp-signature"
\r
52 ALoCoQl5qYYhTQURIo5NWTi+FId1LCokWgxFgVDEaokOaPheO0smPU/LCG+Bn+buGWKrd4Gn1Los
\r
53 X-BeenThere: notmuch@notmuchmail.org
\r
54 X-Mailman-Version: 2.1.13
\r
56 List-Id: "Use and development of the notmuch mail system."
\r
57 <notmuch.notmuchmail.org>
\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
61 List-Post: <mailto:notmuch@notmuchmail.org>
\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
65 X-List-Received-Date: Wed, 25 Jan 2012 10:47:55 -0000
\r
68 Content-Type: text/plain
\r
69 Content-Transfer-Encoding: quoted-printable
\r
71 On Tue, 24 Jan 2012 16:06:17 -0800, Jameson Graef Rollins <jrollins@finestr=
\r
73 > notmuch-show-tag-thread-internal: applies a tag to all messages in
\r
74 > thread. If option remove flag is t, tags will be removed instead of
\r
77 If it's non-nil, but yes.
\r
79 > notmuch-show-next-thread: moves to the next thread in the search
\r
80 > result. If given a prefix, will show the next result, otherwise will
\r
81 > just move to it in the search view.
\r
83 > Two new interactive functions, notmuch-show-{add,remove}-tag-thread,
\r
84 > are also added. Together, these provide a better suit of thread
\r
85 > tagging and navigation tools.
\r
87 > The higher level thread archiving functions are modified to use these
\r
90 > emacs/notmuch-show.el | 46 +++++++++++++++++++++++++++++++++----------=
\r
92 > 1 files changed, 33 insertions(+), 13 deletions(-)
\r
94 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
95 > index a0045fc..fb908b0 100644
\r
96 > --- a/emacs/notmuch-show.el
\r
97 > +++ b/emacs/notmuch-show.el
\r
98 > @@ -1525,20 +1525,38 @@ argument, hide all of the messages."
\r
100 > (backward-button 1))
\r
102 > -(defun notmuch-show-archive-thread-internal (show-next)
\r
103 > - ;; Remove the tag from the current set of messages.
\r
104 > +(defun notmuch-show-tag-thread-internal (tag &optional remove)
\r
105 > + "Add tag to the current set of messages.
\r
107 "Add TAG to all messages in the current buffer."
\r
110 > +If the remove switch is given, tags will be removed instead of
\r
113 "If the REMOVE argument is non-nil, ..."
\r
115 > (goto-char (point-min))
\r
116 > - (loop do (notmuch-show-remove-tag "inbox")
\r
117 > - until (not (notmuch-show-goto-message-next)))
\r
118 > - ;; Move to the next item in the search results, if any.
\r
119 > + (let ((tag-function (if remove
\r
120 > + 'notmuch-show-remove-tag
\r
121 > + 'notmuch-show-add-tag)))
\r
122 > + (loop do (funcall tag-function tag)
\r
123 > + until (not (notmuch-show-goto-message-next)))))
\r
125 I wonder if we shouldn't have a macro for "do something to all messages
\r
126 in the current buffer" that could be used more widely.
\r
129 > +(defun notmuch-show-add-tag-thread (tag)
\r
130 > + "Add tag to all messages in the current thread."
\r
132 > + (notmuch-show-tag-thread-internal tag))
\r
134 > +(defun notmuch-show-remove-tag-thread (tag)
\r
135 > + "Remove tag from all messages in the current thread."
\r
137 > + (notmuch-show-tag-thread-internal tag t))
\r
139 > +(defun notmuch-show-next-thread (&optional show-next)
\r
140 > + "Move to the next item in the search results, if any."
\r
142 Describe the meaning of SHOW-NEXT.
\r
144 > + (interactive "P")
\r
145 > (let ((parent-buffer notmuch-show-parent-buffer))
\r
146 > (notmuch-kill-this-buffer)
\r
147 > - (if parent-buffer
\r
149 > - (switch-to-buffer parent-buffer)
\r
150 > - (notmuch-search-next-thread)
\r
152 > - (notmuch-search-show-thread))))))
\r
153 > + (when parent-buffer
\r
154 > + (switch-to-buffer parent-buffer)
\r
155 > + (notmuch-search-next-thread)
\r
157 > + (notmuch-search-show-thread)))))
\r
159 > (defun notmuch-show-archive-thread ()
\r
160 > "Archive each message in thread, then show next thread from search.
\r
161 > @@ -1552,12 +1570,14 @@ being delivered to the same thread. It does not a=
\r
163 > entire thread, but only the messages shown in the current
\r
166 > - (notmuch-show-archive-thread-internal t))
\r
167 > + (notmuch-show-remove-tag-thread "inbox")
\r
168 > + (notmuch-show-next-thread t))
\r
170 > (defun notmuch-show-archive-thread-then-exit ()
\r
171 > "Archive each message in thread, then exit back to search results."
\r
173 > - (notmuch-show-archive-thread-internal nil))
\r
174 > + (notmuch-show-remove-tag-thread "inbox")
\r
175 > + (notmuch-show-next-thread))
\r
177 > (defun notmuch-show-stash-cc ()
\r
178 > "Copy CC field of current message to kill-ring."
\r
182 > _______________________________________________
\r
183 > notmuch mailing list
\r
184 > notmuch@notmuchmail.org
\r
185 > http://notmuchmail.org/mailman/listinfo/notmuch
\r
188 Content-Type: application/pgp-signature
\r
190 -----BEGIN PGP SIGNATURE-----
\r
191 Version: GnuPG v1.4.11 (GNU/Linux)
\r
193 iEYEARECAAYFAk8f3dMACgkQaezQq/BJZRZqfwCbBFxjBEvmkV740tf5bL96HMwU
\r
194 MB4An20ZmUSJqwZwzm7UBdhkBy1dW60S
\r
196 -----END PGP SIGNATURE-----
\r