1 Return-Path: <m.walters@qmul.ac.uk>
\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 08DFF431FAF
\r
6 for <notmuch@notmuchmail.org>; Sat, 7 Apr 2012 20:56:02 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5
\r
12 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,
\r
13 NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 zBNiUUdVCiRf for <notmuch@notmuchmail.org>;
\r
17 Sat, 7 Apr 2012 20:56:01 -0700 (PDT)
\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])
\r
19 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 0E91C431FAE
\r
22 for <notmuch@notmuchmail.org>; Sat, 7 Apr 2012 20:56:01 -0700 (PDT)
\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])
\r
24 by mail2.qmul.ac.uk with esmtp (Exim 4.71)
\r
25 (envelope-from <m.walters@qmul.ac.uk>)
\r
26 id 1SGjEK-0002lY-MU; Sun, 08 Apr 2012 04:55:57 +0100
\r
27 Received: from 94.196.15.10.threembb.co.uk ([94.196.15.10] helo=localhost)
\r
28 by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)
\r
29 (envelope-from <m.walters@qmul.ac.uk>)
\r
30 id 1SGjEG-0004Aw-N9; Sun, 08 Apr 2012 04:55:56 +0100
\r
31 From: Mark Walters <markwalters1009@gmail.com>
\r
32 To: Jameson Graef Rollins <jrollins@finestructure.net>,
\r
33 Notmuch Mail <notmuch@notmuchmail.org>
\r
34 Subject: Re: [PATCH 7/8] emacs: modify show tag functions to use new
\r
35 notmuch-tag interface
\r
36 In-Reply-To: <1333845338-22960-8-git-send-email-jrollins@finestructure.net>
\r
37 References: <1333354853-25729-1-git-send-email-jrollins@finestructure.net>
\r
38 <1333845338-22960-1-git-send-email-jrollins@finestructure.net>
\r
39 <1333845338-22960-2-git-send-email-jrollins@finestructure.net>
\r
40 <1333845338-22960-3-git-send-email-jrollins@finestructure.net>
\r
41 <1333845338-22960-4-git-send-email-jrollins@finestructure.net>
\r
42 <1333845338-22960-5-git-send-email-jrollins@finestructure.net>
\r
43 <1333845338-22960-6-git-send-email-jrollins@finestructure.net>
\r
44 <1333845338-22960-7-git-send-email-jrollins@finestructure.net>
\r
45 <1333845338-22960-8-git-send-email-jrollins@finestructure.net>
\r
46 User-Agent: Notmuch/0.12+96~g8f5ec3b (http://notmuchmail.org) Emacs/23.3.1
\r
47 (x86_64-pc-linux-gnu)
\r
48 Date: Sun, 08 Apr 2012 04:56:00 +0100
\r
49 Message-ID: <87zkam6fn3.fsf@qmul.ac.uk>
\r
51 Content-Type: text/plain; charset=us-ascii
\r
52 X-Sender-Host-Address: 94.196.15.10
\r
53 X-QM-SPAM-Info: Sender has good ham record. :)
\r
54 X-QM-Body-MD5: 6f44aeeeb60f972af20910723adb85d5 (of first 20000 bytes)
\r
55 X-SpamAssassin-Score: -2.3
\r
56 X-SpamAssassin-SpamBar: --
\r
57 X-SpamAssassin-Report: The QM spam filters have analysed this message to
\r
59 spam. We require at least 5.0 points to mark a message as spam.
\r
60 This message scored -2.3 points.
\r
61 Summary of the scoring:
\r
62 * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,
\r
64 * [138.37.6.40 listed in list.dnswl.org]
\r
65 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
\r
66 provider * (markwalters1009[at]gmail.com)
\r
67 * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
\r
69 X-QM-Scan-Virus: ClamAV says the message is clean
\r
70 X-BeenThere: notmuch@notmuchmail.org
\r
71 X-Mailman-Version: 2.1.13
\r
73 List-Id: "Use and development of the notmuch mail system."
\r
74 <notmuch.notmuchmail.org>
\r
75 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
76 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
77 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
78 List-Post: <mailto:notmuch@notmuchmail.org>
\r
79 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
80 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
81 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
82 X-List-Received-Date: Sun, 08 Apr 2012 03:56:02 -0000
\r
85 On Sun, 08 Apr 2012, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
\r
86 > The main change here is to modify argument parsing so as to not force
\r
87 > tag-changes to be a list, and to let notmuch-tag handle prompting the
\r
88 > user when required. doc strings are also updated and cleaned up.
\r
90 > emacs/notmuch-show.el | 26 +++++++++++++++-----------
\r
91 > 1 files changed, 15 insertions(+), 11 deletions(-)
\r
93 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
94 > index a4c313d..69bca02 100644
\r
95 > --- a/emacs/notmuch-show.el
\r
96 > +++ b/emacs/notmuch-show.el
\r
97 > @@ -1641,22 +1641,26 @@ TAG-CHANGES is a list of tag operations for `notmuch-tag'."
\r
98 > (let* ((current-tags (notmuch-show-get-tags))
\r
99 > (new-tags (notmuch-update-tags current-tags tag-changes)))
\r
100 > (unless (equal current-tags new-tags)
\r
101 > - (apply 'notmuch-tag (notmuch-show-get-message-id) tag-changes)
\r
102 > + (funcall 'notmuch-tag (notmuch-show-get-message-id) tag-changes)
\r
103 > (notmuch-show-set-tags new-tags))))
\r
105 > -(defun notmuch-show-tag (&optional initial-input)
\r
106 > - "Change tags for the current message, read input from the minibuffer."
\r
107 > +(defun notmuch-show-tag (&optional tag-changes)
\r
108 > + "Change tags for the current message.
\r
110 > +See `notmuch-tag' for information on the format of TAG-CHANGES."
\r
112 > - (let ((tag-changes (notmuch-read-tag-changes
\r
113 > - initial-input (notmuch-show-get-message-id))))
\r
114 > - (apply 'notmuch-show-tag-message tag-changes)))
\r
115 > + (setq tag-changes (funcall 'notmuch-tag (notmuch-show-get-message-id) tag-changes))
\r
116 > + (let* ((current-tags (notmuch-show-get-tags))
\r
117 > + (new-tags (notmuch-update-tags current-tags tag-changes)))
\r
118 > + (unless (equal current-tags new-tags)
\r
119 > + (notmuch-show-set-tags new-tags))))
\r
121 Hi. If I am following this correctly the setq line funcalls notmuch tag
\r
122 regardless of whether there will be a tag change.
\r
124 whereas the code from patch 8/8
\r
125 > -(defun notmuch-show-tag-message (&rest tag-changes)
\r
126 > - "Change tags for the current message.
\r
128 > -TAG-CHANGES is a list of tag operations for `notmuch-tag'."
\r
129 > - (let* ((current-tags (notmuch-show-get-tags))
\r
130 > - (new-tags (notmuch-update-tags current-tags tag-changes)))
\r
131 > - (unless (equal current-tags new-tags)
\r
132 > - (funcall 'notmuch-tag (notmuch-show-get-message-id) tag-changes)
\r
133 > - (notmuch-show-set-tags new-tags))))
\r
136 seems to only do the funcall when the tags change.
\r
138 I think this is what is making the two tests fail: they count the number
\r
139 of invocations of notmuch and in case there is one invocation of notmuch
\r
140 show and one of notmuch tag -unread message-id, where before it was just
\r
141 the single notmuch show.
\r