1 Return-Path: <dmitry.kurochkin@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 721E0431FD2
\r
6 for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 17:51:26 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id 5GcWvdz40L7d for <notmuch@notmuchmail.org>;
\r
17 Sun, 29 Jan 2012 17:51:25 -0800 (PST)
\r
18 Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com
\r
19 [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id A697F431FBC
\r
22 for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 17:51:25 -0800 (PST)
\r
23 Received: by bke11 with SMTP id 11so942363bke.26
\r
24 for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 17:51:24 -0800 (PST)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=from:to:cc:subject:in-reply-to:references:user-agent:date
\r
27 :message-id:mime-version:content-type;
\r
28 bh=IiAG+8nJprtMalIS+7Op9BqP6k34iSdKEcn8kuENXYw=;
\r
29 b=jO2afrIf4obKm6O6RSKQKxeTvJoYG2+m4EFn+FCSyiPhlxQw1EwXc+qBwN1LCEf8Ry
\r
30 AjMuN8uvTnYkPKYKdavrmFdiI3TekgXYXcfWv2BMgwAC/3ewUvFYuBrQbcVh/TdGqPtP
\r
31 H3k58o4xX0IKGD6rTLLRe5C8PJIaji0PU1QEM=
\r
32 Received: by 10.204.129.198 with SMTP id p6mr7459468bks.96.1327888284175;
\r
33 Sun, 29 Jan 2012 17:51:24 -0800 (PST)
\r
34 Received: from localhost ([91.144.186.21])
\r
35 by mx.google.com with ESMTPS id 20sm23351692bkr.0.2012.01.29.17.51.23
\r
36 (version=TLSv1/SSLv3 cipher=OTHER);
\r
37 Sun, 29 Jan 2012 17:51:23 -0800 (PST)
\r
38 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
39 To: Austin Clements <amdragon@MIT.EDU>
\r
40 Subject: Re: [PATCH 8/6] emacs: use message ids instead of thread id in
\r
41 `notmuch-show-operate-all'
\r
42 In-Reply-To: <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 <20120129231120.GJ17991@mit.edu>
\r
46 User-Agent: Notmuch/0.11+134~g7ddba9d (http://notmuchmail.org) Emacs/23.3.1
\r
47 (x86_64-pc-linux-gnu)
\r
48 Date: Mon, 30 Jan 2012 05:50:14 +0400
\r
49 Message-ID: <87y5sq6js9.fsf@gmail.com>
\r
51 Content-Type: text/plain; charset=us-ascii
\r
52 Cc: notmuch@notmuchmail.org
\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: Mon, 30 Jan 2012 01:51:26 -0000
\r
67 EOn Sun, 29 Jan 2012 18:11:20 -0500, Austin Clements <amdragon@MIT.EDU> wrote:
\r
68 > Eighth in the increasingly inaccurately named six patch series...
\r
70 > Quoth Dmitry Kurochkin on Jan 28 at 9:59 am:
\r
71 > > Before the change, `notmuch-show-operate-all' used thread id for
\r
72 > > "notmuch tag" search. This could result in tagging unexpected
\r
73 > > messages that were added to the thread after the notmuch-show buffer
\r
74 > > was created. The patch changes `notmuch-show-operate-all' to use ids
\r
75 > > of shown messages to fix this.
\r
77 > Are you planning to roll this into your earlier patch?
\r
80 I would prefer to leave it separate.
\r
83 > > emacs/notmuch-show.el | 23 ++++++++++++++++++++++-
\r
84 > > 1 files changed, 22 insertions(+), 1 deletions(-)
\r
86 > > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
87 > > index 2ca4d92..e606224 100644
\r
88 > > --- a/emacs/notmuch-show.el
\r
89 > > +++ b/emacs/notmuch-show.el
\r
90 > > @@ -1170,6 +1170,15 @@ All currently available key bindings:
\r
91 > > (notmuch-show-move-to-message-top)
\r
94 > > +(defun notmuch-show-mapc (function)
\r
95 > > + "Iterate through all messages with
\r
96 > > +`notmuch-show-goto-message-next' and call `function' for side
\r
99 > `function' should be FUNCTION.
\r
104 > > + (save-excursion
\r
105 > > + (goto-char (point-min))
\r
106 > > + (loop do (funcall function)
\r
107 > > + while (notmuch-show-goto-message-next))))
\r
109 > > ;; Functions relating to the visibility of messages and their
\r
112 > > @@ -1222,6 +1231,18 @@ Some useful entries are:
\r
113 > > "Return the message id of the current message."
\r
114 > > (concat "id:\"" (notmuch-show-get-prop :id) "\""))
\r
116 > > +(defun notmuch-show-get-messages-ids ()
\r
117 > > + "Return all message ids of currently shown messages."
\r
119 > "currently shown" could mean visible on the screen, which is not what
\r
120 > you mean. You also don't mean "open messages". Maybe "Return all
\r
121 > message ids of messages in this show buffer"?
\r
124 Changed to "messages in the current thread". That is consistent with
\r
125 other docstrings in notmuch-show.el.
\r
127 > > + (let ((message-ids))
\r
128 > > + (notmuch-show-mapc
\r
129 > > + (lambda () (push (notmuch-show-get-message-id) message-ids)))
\r
130 > > + message-ids))
\r
132 > > +(defun notmuch-show-get-messages-ids-search ()
\r
133 > > + "Return a search string for all message ids of currently shown
\r
144 > > + (mapconcat 'identity (notmuch-show-get-messages-ids) " or "))
\r
146 > > ;; dme: Would it make sense to use a macro for many of these?
\r
148 > > (defun notmuch-show-get-filename ()
\r
149 > > @@ -1496,7 +1517,7 @@ i.e. a list of tags to change with '+' and '-' prefixes."
\r
150 > > `Changed-tags' is a list of tag operations for \"notmuch tag\",
\r
151 > > i.e. a list of tags to change with '+' and '-' prefixes."
\r
152 > > (interactive (notmuch-select-tags-with-completion nil notmuch-show-thread-id))
\r
153 > > - (apply 'notmuch-tag notmuch-show-thread-id changed-tags)
\r
154 > > + (apply 'notmuch-tag (notmuch-show-get-messages-ids-search) changed-tags)
\r
155 > > (save-excursion
\r
156 > > (goto-char (point-min))
\r
157 > > (loop do (let* ((current-tags (notmuch-show-get-tags))
\r