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 D57C640A95E
\r
6 for <notmuch@notmuchmail.org>; Fri, 6 Jun 2014 05:02:36 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0.502 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_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 dZjfeZmLE4wT for <notmuch@notmuchmail.org>;
\r
17 Fri, 6 Jun 2014 05:02:29 -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 7708540A93B
\r
22 for <notmuch@notmuchmail.org>; Fri, 6 Jun 2014 05:02:29 -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 1Wssqp-0003T4-4A; Fri, 06 Jun 2014 13:02:27 +0100
\r
27 Received: from 5751dfa2.skybroadband.com ([87.81.223.162] helo=localhost)
\r
28 by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)
\r
29 (envelope-from <m.walters@qmul.ac.uk>)
\r
30 id 1Wssqo-0004Wm-RC; Fri, 06 Jun 2014 13:02:27 +0100
\r
31 From: Mark Walters <markwalters1009@gmail.com>
\r
32 To: Tom Hirschowitz <tom.hirschowitz@univ-savoie.fr>, notmuch@notmuchmail.org
\r
33 Subject: Re: an emacs macro
\r
34 In-Reply-To: <87bnu7k7j3.fsf@hirscho.lama.univ-savoie.fr>
\r
35 References: <87bnu7k7j3.fsf@hirscho.lama.univ-savoie.fr>
\r
36 User-Agent: Notmuch/0.15.2+615~g78e3a93 (http://notmuchmail.org) Emacs/23.4.1
\r
37 (x86_64-pc-linux-gnu)
\r
38 Date: Fri, 06 Jun 2014 13:02:25 +0100
\r
39 Message-ID: <8761kefdpq.fsf@qmul.ac.uk>
\r
41 Content-Type: text/plain; charset=us-ascii
\r
42 X-Sender-Host-Address: 87.81.223.162
\r
43 X-QM-Geographic: According to ripencc,
\r
44 this message was delivered by a machine in Britain (UK) (GB).
\r
45 X-QM-SPAM-Info: Sender has good ham record. :)
\r
46 X-QM-Body-MD5: fcfac721c17d9da0307bedbf002edcb7 (of first 20000 bytes)
\r
47 X-SpamAssassin-Score: -0.1
\r
48 X-SpamAssassin-SpamBar: /
\r
49 X-SpamAssassin-Report: The QM spam filters have analysed this message to
\r
51 spam. We require at least 5.0 points to mark a message as spam.
\r
52 This message scored -0.1 points.
\r
53 Summary of the scoring:
\r
54 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
\r
55 provider * (markwalters1009[at]gmail.com)
\r
56 * -0.1 AWL AWL: From: address is in the auto white-list
\r
57 X-QM-Scan-Virus: ClamAV says the message is clean
\r
58 X-BeenThere: notmuch@notmuchmail.org
\r
59 X-Mailman-Version: 2.1.13
\r
61 List-Id: "Use and development of the notmuch mail system."
\r
62 <notmuch.notmuchmail.org>
\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
66 List-Post: <mailto:notmuch@notmuchmail.org>
\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
70 X-List-Received-Date: Fri, 06 Jun 2014 12:02:37 -0000
\r
73 On Thu, 05 Jun 2014, Tom Hirschowitz <tom.hirschowitz@univ-savoie.fr> wrote:
\r
76 > I'm trying to define a macro for notmuch/emacs which in show-mode would
\r
78 > - prompt the user for tags (possibly starting with "+"),
\r
80 > - tag the shown message with these tags plus an additional fixed tag,
\r
83 > I know next to nothing about emacs/lisp, so I tried to mimick notmuch*.el.
\r
85 > Here's my most plausible attempt:
\r
87 > (defun notmuch-show-move (tag-changes)
\r
88 > "Add the local tag, plus possibly others, given as interactive arguments."
\r
89 > (interactive (list (notmuch-read-tag-changes (notmuch-show-get-tags)
\r
90 > "Tag message" "+")))
\r
91 > (let* ((tag-changes-with-local (cons "+local" tag-changes))
\r
92 > (rien (notmuch-tag (notmuch-show-get-message-id) tag-changes-with-local))
\r
93 > (current-tags (notmuch-show-get-tags))
\r
94 > (new-tags (notmuch-update-tags current-tags tag-changes-with-local)))
\r
95 > (unless (equal current-tags new-tags)
\r
96 > (notmuch-show-set-tags new-tags))))
\r
98 Yes this looks fine for notmuch-show. It won't work for search mode as
\r
99 notmuch-show- commands basically only work in notmuch-show. I would
\r
100 suggest copying notmuch-search-tag and tweaking it to use
\r
101 tag-changes-with-local (as you have done for the show version
\r
102 above). Something similar should work for tree-mode (ie copy
\r
105 I think you will need separate functions for the three modes.
\r