1 Return-Path: <olivier.berger@telecom-sudparis.eu>
\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 0E412431FAF
\r
6 for <notmuch@notmuchmail.org>; Wed, 7 May 2014 04:37:25 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 Cd9q6SOdRd80 for <notmuch@notmuchmail.org>;
\r
16 Wed, 7 May 2014 04:37:18 -0700 (PDT)
\r
17 Received: from zproxy120.enst.fr (zproxy120.enst.fr [137.194.52.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 9183A431FAE
\r
19 for <notmuch@notmuchmail.org>; Wed, 7 May 2014 04:37:18 -0700 (PDT)
\r
20 Received: from localhost (localhost [127.0.0.1])
\r
21 by zproxy120.enst.fr (Postfix) with ESMTP id 93F3A1134DE
\r
22 for <notmuch@notmuchmail.org>; Wed, 7 May 2014 13:37:17 +0200 (CEST)
\r
23 X-Virus-Scanned: amavisd-new at zproxy120.enst.fr
\r
24 Received: from zproxy120.enst.fr ([127.0.0.1])
\r
25 by localhost (zproxy120.enst.fr [127.0.0.1]) (amavisd-new, port 10024)
\r
26 with ESMTP id Kye+ceGE79eY for <notmuch@notmuchmail.org>;
\r
27 Wed, 7 May 2014 13:37:13 +0200 (CEST)
\r
28 Received: from localhost (bauxite.int-evry.fr [157.159.110.64])
\r
29 by zproxy120.enst.fr (Postfix) with ESMTPSA id 384A01134A3
\r
30 for <notmuch@notmuchmail.org>; Wed, 7 May 2014 13:37:13 +0200 (CEST)
\r
31 From: Olivier Berger <olivier.berger@telecom-sudparis.eu>
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: Re: Improving spam-tagging keybinding function to act on region in
\r
35 In-Reply-To: <87mweuzy87.fsf@qmul.ac.uk>
\r
36 References: <87oazb9k5f.fsf@inf-8660.int-evry.fr> <87mweuzy87.fsf@qmul.ac.uk>
\r
37 User-Agent: Notmuch/0.17 (http://notmuchmail.org) Emacs/24.3.1
\r
38 (x86_64-pc-linux-gnu)
\r
39 Date: Wed, 07 May 2014 13:37:10 +0200
\r
40 Message-ID: <87bnv92521.fsf@inf-8660.int-evry.fr>
\r
42 Content-Type: text/plain
\r
43 X-BeenThere: notmuch@notmuchmail.org
\r
44 X-Mailman-Version: 2.1.13
\r
46 List-Id: "Use and development of the notmuch mail system."
\r
47 <notmuch.notmuchmail.org>
\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
51 List-Post: <mailto:notmuch@notmuchmail.org>
\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
55 X-List-Received-Date: Wed, 07 May 2014 11:37:25 -0000
\r
59 Mark Walters <markwalters1009@gmail.com> writes:
\r
63 > As this section was rather outdated I have updated to modern notmuch. (In
\r
64 > fact the lisp snippets should work back to at least 0.13)
\r
66 > On Tue, 06 May 2014, Olivier Berger <olivier.berger@telecom-sudparis.eu> wrote:
\r
69 >> I've tried tu use the tips indicated at
\r
70 >> http://notmuchmail.org/emacstips/#index8h2 so as to add a keybinding to
\r
71 >> tag spam messages, and wonder if there's a possibility to make it apply
\r
72 >> on selected regions, like what notmuch-search-archive-thread does.
\r
74 > I have added a snippet showing how to do this (and noted that is not
\r
75 > possible in notmuch-tree as we don't have a tag region option there).
\r
78 Thanks. This works exactly I like it :-)
\r
80 >> Btw, I think that the current examples could be improved by adding a (next-line)
\r
81 >> at the end, like :
\r
82 >> (define-key notmuch-search-mode-map "S"
\r
84 >> "mark messages in thread as spam"
\r
86 >> (notmuch-search-tag '("+spam" "-inbox"))
\r
89 > I have left this as it is as this works in search mode, but not show
\r
90 > mode and I didn't want to have too many examples. Obviously feel free to
\r
91 > edit the wiki if you like!
\r
94 Note that I'm now using the following :
\r
95 (define-key notmuch-search-mode-map "S"
\r
96 (lambda (&optional beg end)
\r
97 "mark messages in thread as spam"
\r
98 (interactive (notmuch-search-interactive-region))
\r
99 (notmuch-search-tag '("+spam" "-inbox") beg end)
\r
100 (if (eq beg end) (notmuch-search-next-thread))))
\r
102 This offers the possibility to jump to the next line when tagging
\r
103 individual lines, and not do so when acting on a region.
\r
105 Btw, such a difference in behaviour may be a tiny, but still nice
\r
106 improvement on the code of notmuch-search-archive-thread too.
\r
108 I haven't touched the wiki, as I'm not sure this is the best way to
\r
109 write it and everyone would be interested.
\r
117 http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
\r
118 Ingenieur Recherche - Dept INF
\r
119 Institut Mines-Telecom, Telecom SudParis, Evry (France)
\r