Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 61 / f39df00ae76149ef7676047f7d18ca9151e30d
1 Return-Path: <markwalters1009@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 57EDE431FBC\r
6         for <notmuch@notmuchmail.org>; Thu, 22 May 2014 01:07:04 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id IbY8R0D9z04m for <notmuch@notmuchmail.org>;\r
18         Thu, 22 May 2014 01:06:57 -0700 (PDT)\r
19 Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com\r
20         [209.85.212.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id B2926431FAE\r
23         for <notmuch@notmuchmail.org>; Thu, 22 May 2014 01:06:57 -0700 (PDT)\r
24 Received: by mail-wi0-f172.google.com with SMTP id hi2so8811246wib.11\r
25         for <notmuch@notmuchmail.org>; Thu, 22 May 2014 01:06:56 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
28         :mime-version:content-type;\r
29         bh=Vdr0qdRAS3HMEiAeYxsS01OVmI8i8agNKmcQ+WI1iWk=;\r
30         b=XrwubSY/q3QtlGwkhIQQduBzARtSOcItaAV/8hzvlH2duV32QRoH4XJwCCFdmaaLbB\r
31         IPzVaJ2VGzQ74COfk17qcwd+jOqK5AL6LBWWk9WwMiLHHtcUCdzw7lCaryCgJCvLK7ot\r
32         KGJix9QqlISoUou3e/Soe+pIcayjeQYbs2m5PcBDqAz2YzBy4dZaKfXbuziLzi4Zq/Vo\r
33         AkoCGR68XrIoTWepASnLN1kTlCYeKqWDrk1Y3nlOFduN2BmK2V6sli1eLBvhkuotVfDP\r
34         i2YQ4oNHKVLA0dGsfzHb3mFuN1cEpExHGeJwjtny+QQWBUNQQJ+U/d/ZLJCIt0UwZzm4\r
35         Z9qg==\r
36 X-Received: by 10.180.84.226 with SMTP id c2mr15085697wiz.50.1400746016438;\r
37         Thu, 22 May 2014 01:06:56 -0700 (PDT)\r
38 Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162])\r
39         by mx.google.com with ESMTPSA id iy13sm6616144wic.1.2014.05.22.01.06.55\r
40         for <multiple recipients>\r
41         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
42         Thu, 22 May 2014 01:06:55 -0700 (PDT)\r
43 From: Mark Walters <markwalters1009@gmail.com>\r
44 To: Olivier Berger <olivier.berger@telecom-sudparis.eu>,\r
45         notmuch@notmuchmail.org\r
46 Subject: Re: Improving spam-tagging keybinding function to act on region in\r
47         emacs\r
48 In-Reply-To: <87bnv92521.fsf@inf-8660.int-evry.fr>\r
49 References: <87oazb9k5f.fsf@inf-8660.int-evry.fr> <87mweuzy87.fsf@qmul.ac.uk>\r
50         <87bnv92521.fsf@inf-8660.int-evry.fr>\r
51 User-Agent: Notmuch/0.15.2+615~g78e3a93 (http://notmuchmail.org) Emacs/23.4.1\r
52         (x86_64-pc-linux-gnu)\r
53 Date: Thu, 22 May 2014 09:06:54 +0100\r
54 Message-ID: <87wqde6xup.fsf@qmul.ac.uk>\r
55 MIME-Version: 1.0\r
56 Content-Type: text/plain; charset=us-ascii\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Thu, 22 May 2014 08:07:04 -0000\r
70 \r
71 On Wed, 07 May 2014, Olivier Berger <olivier.berger@telecom-sudparis.eu> wrote:\r
72 > Hi.\r
73 >\r
74 > Mark Walters <markwalters1009@gmail.com> writes:\r
75 >\r
76 >> Hello\r
77 >>\r
78 >> As this section was rather outdated I have updated to modern notmuch. (In\r
79 >> fact the lisp snippets should work back to at least 0.13)\r
80 >>\r
81 >> On Tue, 06 May 2014, Olivier Berger <olivier.berger@telecom-sudparis.eu> wrote:\r
82 >>> Hi.\r
83 >>>\r
84 >>> I've tried tu use the tips indicated at\r
85 >>> http://notmuchmail.org/emacstips/#index8h2 so as to add a keybinding to\r
86 >>> tag spam messages, and wonder if there's a possibility to make it apply\r
87 >>> on selected regions, like what notmuch-search-archive-thread does.\r
88 >>\r
89 >> I have added a snippet showing how to do this (and noted that is not\r
90 >> possible in notmuch-tree as we don't have a tag region option there).\r
91 >>\r
92 >\r
93 > Thanks. This works exactly I like it :-)\r
94 >\r
95 >>> Btw, I think that the current examples could be improved by adding a (next-line)\r
96 >>> at the end, like :\r
97 >>> (define-key notmuch-search-mode-map "S"\r
98 >>>         (lambda ()\r
99 >>>           "mark messages in thread as spam"\r
100 >>>           (interactive)\r
101 >>>           (notmuch-search-tag '("+spam" "-inbox"))\r
102 >>>           (next-line)))\r
103 >>\r
104 >> I have left this as it is as this works in search mode, but not show\r
105 >> mode and I didn't want to have too many examples. Obviously feel free to\r
106 >> edit the wiki if you like!\r
107 >>\r
108 >\r
109 > Note that I'm now using the following :\r
110 >   (define-key notmuch-search-mode-map "S"\r
111 >         (lambda (&optional beg end)\r
112 >           "mark messages in thread as spam"\r
113 >           (interactive (notmuch-search-interactive-region))\r
114 >           (notmuch-search-tag '("+spam" "-inbox") beg end)\r
115 >           (if (eq beg end) (notmuch-search-next-thread))))\r
116 >\r
117 > This offers the possibility to jump to the next line when tagging\r
118 > individual lines, and not do so when acting on a region.\r
119 >\r
120 > Btw, such a difference in behaviour may be a tiny, but still nice\r
121 > improvement on the code of notmuch-search-archive-thread too.\r
122 \r
123 I think this is worth doing: do you want to send a patch? The above lisp\r
124 is fine but I would replace the "if" by "when". (The main difference is\r
125 that "when" cannot take an else clause so using when flags up that there\r
126 is not an else clause.)\r
127 \r
128 If the above is inconvenient then I am happy to post such a patch.\r
129 \r
130 Best wishes\r
131 \r
132 Mark\r
133 \r
134 \r
135 >\r
136 > I haven't touched the wiki, as I'm not sure this is the best way to\r
137 > write it and everyone would be interested.\r
138 >\r
139 > Hope this helps.\r
140 >\r
141 > Best regards,\r
142 >\r
143 > -- \r
144 > Olivier BERGER \r
145 > http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8\r
146 > Ingenieur Recherche - Dept INF\r
147 > Institut Mines-Telecom, Telecom SudParis, Evry (France)\r
148 > _______________________________________________\r
149 > notmuch mailing list\r
150 > notmuch@notmuchmail.org\r
151 > http://notmuchmail.org/mailman/listinfo/notmuch\r