RE: Reply all - issue
[notmuch-archives.git] / 03 / 8f44bcfe282868cfb8e7bffb90419f50160ad6
1 Return-Path: <amdragon@mit.edu>\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 3B038429E57\r
6         for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 15:12:11 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \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 mxfpL+cXU-Mn for <notmuch@notmuchmail.org>;\r
16         Sun, 29 Jan 2012 15:12:10 -0800 (PST)\r
17 Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU\r
18         [18.9.25.14])\r
19         by olra.theworths.org (Postfix) with ESMTP id A7761429E54\r
20         for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 15:12:10 -0800 (PST)\r
21 X-AuditID: 1209190e-b7f7c6d0000008c3-cd-4f25d24aec92\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
23         by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 33.72.02243.A42D52F4; Sun, 29 Jan 2012 18:12:10 -0500 (EST)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q0TNC9WB020541; \r
27         Sun, 29 Jan 2012 18:12:10 -0500\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q0TNC8bB024487\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Sun, 29 Jan 2012 18:12:09 -0500 (EST)\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1Rrdu4-00008t-JZ; Sun, 29 Jan 2012 18:11:20 -0500\r
37 Date: Sun, 29 Jan 2012 18:11:20 -0500\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
40 Subject: Re: [PATCH 8/6] emacs: use message ids instead of thread id in\r
41         `notmuch-show-operate-all'\r
42 Message-ID: <20120129231120.GJ17991@mit.edu>\r
43 References: <1327725684-5887-1-git-send-email-dmitry.kurochkin@gmail.com>\r
44         <1327730348-6466-1-git-send-email-dmitry.kurochkin@gmail.com>\r
45 MIME-Version: 1.0\r
46 Content-Type: text/plain; charset=us-ascii\r
47 Content-Disposition: inline\r
48 In-Reply-To: <1327730348-6466-1-git-send-email-dmitry.kurochkin@gmail.com>\r
49 User-Agent: Mutt/1.5.21 (2010-09-15)\r
50 X-Brightmail-Tracker:\r
51  H4sIAAAAAAAAA+NgFvrHIsWRmVeSWpSXmKPExsUixG6nrut1SdXfoG2+kMXVrf3sFtdvzmR2\r
52         YPLYOesuu8ezVbeYA5iiuGxSUnMyy1KL9O0SuDIaP/kXtItVnLj3kLGB8Z5gFyMHh4SAicSq\r
53         A7FdjJxAppjEhXvr2UBsIYF9jBKrD2VB2BsYJa78jYewTzJJvH8Q3sXIBWQvYZQ4dW0eE8gc\r
54         FgFVifffdUFq2AQ0JLbtX84IYosIGErcuviKGcRmFpCW+Pa7mQnEFhZIkXj94B7YLl4BHYmb\r
55         b5ezQczsZJS4/Pk1C0RCUOLkzCcsEM1aEjf+vQTbBTJo+T8OEJNTwEvi1EI+kApRARWJKSe3\r
56         sU1gFJqFpHkWkuZZCM0LGJlXMcqm5Fbp5iZm5hSnJusWJyfm5aUW6Rrr5WaW6KWmlG5iBAUz\r
57         pyTfDsavB5UOMQpwMCrx8CquUPEXYk0sK67MPcQoycGkJMobeEHVX4gvKT+lMiOxOCO+qDQn\r
58         tfgQowQHs5II75xlQDnelMTKqtSifJiUNAeLkjivmtY7PyGB9MSS1OzU1ILUIpisDAeHkgTv\r
59         0YtAjYJFqempFWmZOSUIaSYOTpDhPEDDL4HU8BYXJOYWZ6ZD5E8xKkqJ814FSQiAJDJK8+B6\r
60         YcnmFaM40CvCvPNAqniAiQqu+xXQYCagwc8ZwAaXJCKkpBoYN53wOtmk/jLx7nrnxgMGK8Un\r
61         LmE071fwPHmlfI2S0GzvIxv8GXPXVzpwOMewRFc0/y++y29XuiJeV2zL9N3zzDcc36P278eb\r
62         /YsLjnXl/3xnpSSfOJOxV8LMu+D3mnph9fkHfx7dIftVpWvbS2UJYQ2D7ikOgh+5vri7fOq+\r
63         clF22nGHOes5lViKMxINtZiLihMBxTwphREDAAA=\r
64 Cc: notmuch@notmuchmail.org\r
65 X-BeenThere: notmuch@notmuchmail.org\r
66 X-Mailman-Version: 2.1.13\r
67 Precedence: list\r
68 List-Id: "Use and development of the notmuch mail system."\r
69         <notmuch.notmuchmail.org>\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
71         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
73 List-Post: <mailto:notmuch@notmuchmail.org>\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
76         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
77 X-List-Received-Date: Sun, 29 Jan 2012 23:12:11 -0000\r
78 \r
79 Eighth in the increasingly inaccurately named six patch series...\r
80 \r
81 Quoth Dmitry Kurochkin on Jan 28 at  9:59 am:\r
82 > Before the change, `notmuch-show-operate-all' used thread id for\r
83 > "notmuch tag" search.  This could result in tagging unexpected\r
84 > messages that were added to the thread after the notmuch-show buffer\r
85 > was created.  The patch changes `notmuch-show-operate-all' to use ids\r
86 > of shown messages to fix this.\r
87 \r
88 Are you planning to roll this into your earlier patch?\r
89 \r
90 > ---\r
91 >  emacs/notmuch-show.el |   23 ++++++++++++++++++++++-\r
92 >  1 files changed, 22 insertions(+), 1 deletions(-)\r
93\r
94 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
95 > index 2ca4d92..e606224 100644\r
96 > --- a/emacs/notmuch-show.el\r
97 > +++ b/emacs/notmuch-show.el\r
98 > @@ -1170,6 +1170,15 @@ All currently available key bindings:\r
99 >      (notmuch-show-move-to-message-top)\r
100 >      t))\r
101 >  \r
102 > +(defun notmuch-show-mapc (function)\r
103 > +  "Iterate through all messages with\r
104 > +`notmuch-show-goto-message-next' and call `function' for side\r
105 > +effects."\r
106 \r
107 `function' should be FUNCTION.\r
108 \r
109 > +  (save-excursion\r
110 > +    (goto-char (point-min))\r
111 > +    (loop do (funcall function)\r
112 > +       while (notmuch-show-goto-message-next))))\r
113 > +\r
114 >  ;; Functions relating to the visibility of messages and their\r
115 >  ;; components.\r
116 >  \r
117 > @@ -1222,6 +1231,18 @@ Some useful entries are:\r
118 >    "Return the message id of the current message."\r
119 >    (concat "id:\"" (notmuch-show-get-prop :id) "\""))\r
120 >  \r
121 > +(defun notmuch-show-get-messages-ids ()\r
122 > +  "Return all message ids of currently shown messages."\r
123 \r
124 "currently shown" could mean visible on the screen, which is not what\r
125 you mean.  You also don't mean "open messages".  Maybe "Return all\r
126 message ids of messages in this show buffer"?\r
127 \r
128 > +  (let ((message-ids))\r
129 > +    (notmuch-show-mapc\r
130 > +     (lambda () (push (notmuch-show-get-message-id) message-ids)))\r
131 > +    message-ids))\r
132 > +\r
133 > +(defun notmuch-show-get-messages-ids-search ()\r
134 > +  "Return a search string for all message ids of currently shown\r
135 > +messages."\r
136 \r
137 Same.\r
138 \r
139 > +  (mapconcat 'identity (notmuch-show-get-messages-ids) " or "))\r
140 > +\r
141 >  ;; dme: Would it make sense to use a macro for many of these?\r
142 >  \r
143 >  (defun notmuch-show-get-filename ()\r
144 > @@ -1496,7 +1517,7 @@ i.e. a list of tags to change with '+' and '-' prefixes."\r
145 >  `Changed-tags' is a list of tag operations for \"notmuch tag\",\r
146 >  i.e. a list of tags to change with '+' and '-' prefixes."\r
147 >    (interactive (notmuch-select-tags-with-completion nil notmuch-show-thread-id))\r
148 > -  (apply 'notmuch-tag notmuch-show-thread-id changed-tags)\r
149 > +  (apply 'notmuch-tag (notmuch-show-get-messages-ids-search) changed-tags)\r
150 >    (save-excursion\r
151 >      (goto-char (point-min))\r
152 >      (loop do (let* ((current-tags (notmuch-show-get-tags))\r