Re: notmuch on w32
[notmuch-archives.git] / 1a / 509a55fe9e3c6a3a9b23048c5a94443f90566b
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 F1129431FC0\r
6         for <notmuch@notmuchmail.org>; Tue,  7 Aug 2012 08:49:33 -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: -1.098\r
10 X-Spam-Level: \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 AHAOTNaNXuFM for <notmuch@notmuchmail.org>;\r
17         Tue,  7 Aug 2012 08:49:33 -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 1F4AB431FAF\r
22         for <notmuch@notmuchmail.org>; Tue,  7 Aug 2012 08:49:33 -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 1Sym2F-0000rw-Ca; Tue, 07 Aug 2012 16:49:31 +0100\r
27 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]\r
28         helo=localhost)\r
29         by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
30         (envelope-from <m.walters@qmul.ac.uk>)\r
31         id 1Sym2F-0001I0-3m; Tue, 07 Aug 2012 16:49:31 +0100\r
32 From: Mark Walters <markwalters1009@gmail.com>\r
33 To: Michal Nazarewicz <mpn@google.com>, notmuch@notmuchmail.org\r
34 Subject: Re: [PATCH] notmuch-show: add notmuch-show-auto-mark-read option\r
35 In-Reply-To: <xa1tpq72d8f0.fsf@mina86.com>\r
36 References:\r
37  <7c2931eb4d34ff78e4c73d721bc00dc60d185e6a.1344260116.git.mina86@mina86.com>\r
38         <874noepwez.fsf@qmul.ac.uk> <xa1tpq72d8f0.fsf@mina86.com>\r
39 User-Agent: Notmuch/0.13.2+96~g634443c (http://notmuchmail.org) Emacs/23.4.1\r
40         (x86_64-pc-linux-gnu)\r
41 Date: Tue, 07 Aug 2012 16:49:24 +0100\r
42 Message-ID: <87mx26bt2z.fsf@qmul.ac.uk>\r
43 MIME-Version: 1.0\r
44 Content-Type: text/plain; charset=utf-8\r
45 Content-Transfer-Encoding: quoted-printable\r
46 X-Sender-Host-Address: 94.192.233.223\r
47 X-QM-SPAM-Info: Sender has good ham record.  :)\r
48 X-QM-Body-MD5: 2fe2388db0178df4e290ea28dcb2462e (of first 20000 bytes)\r
49 X-SpamAssassin-Score: -1.8\r
50 X-SpamAssassin-SpamBar: -\r
51 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
52         determine if it is\r
53         spam. We require at least 5.0 points to mark a message as spam.\r
54         This message scored -1.8 points.\r
55         Summary of the scoring: \r
56         * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
57         *      medium trust\r
58         *      [138.37.6.40 listed in list.dnswl.org]\r
59         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
60         provider *      (markwalters1009[at]gmail.com)\r
61         * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
62         *      domain\r
63         *  0.5 AWL AWL: From: address is in the auto white-list\r
64 X-QM-Scan-Virus: ClamAV says the message is clean\r
65 X-BeenThere: notmuch@notmuchmail.org\r
66 X-Mailman-Version: 2.1.13\r
67 Precedence: list\r
68 List-Id: "Use and development of the notmuch mail system."\r
69         <notmuch.notmuchmail.org>\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
71         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
73 List-Post: <mailto:notmuch@notmuchmail.org>\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
76         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
77 X-List-Received-Date: Tue, 07 Aug 2012 15:49:34 -0000\r
78 \r
79 On Tue, 07 Aug 2012, Michal Nazarewicz <mpn@google.com> wrote:\r
80 >> On Mon, 06 Aug 2012, Michal Nazarewicz <mpn@google.com> wrote:\r
81 >>> @@ -1374,9 +1382,11 @@ current thread."\r
82 >>>    "Are the headers of the current message visible?"\r
83 >>>    (notmuch-show-get-prop :headers-visible))\r
84 >>>=20=20\r
85 >>> -(defun notmuch-show-mark-read ()\r
86 >>> -  "Mark the current message as read."\r
87 >>> -  (notmuch-show-tag-message "-unread"))\r
88 >>> +(defun notmuch-show-mark-read (&optional force)\r
89 >>> +  "Mark the current message as read if FORCE or\r
90 >>> +`notmuch-show-auto-mark-read' is non-nil."\r
91 >>> +  (when (or force notmuch-show-auto-mark-read)\r
92 >>> +    (notmuch-show-tag-message "-unread")))\r
93 >\r
94 > Mark Walters <markwalters1009@gmail.com> writes:\r
95 >> As an alternative approach would allowing a list of tags (or even tag\r
96 >> changes) to apply when a message is "read" do what you want and be more\r
97 >> flexible?\r
98 >\r
99 > Something like the following (not tested)?\r
100 \r
101 Yes this was what I had in mind. I like this (both the symmetry with\r
102 reply tags and the added flexibility) but I will let others\r
103 comment. (There is one small bug in your draft: see below)\r
104 \r
105 Best wishes\r
106 \r
107 Mark\r
108 \r
109 > From: Michal Nazarewicz <mina86@mina86.com>\r
110 > Date: Mon, 6 Aug 2012 15:31:20 +0200\r
111 > Subject: [PATCH] notmuch-show: add notmuch-show-mark-read-tags option\r
112 >\r
113 > The `notmuch-show-mark-read-tags' lists tags that are to be applied when\r
114 > message is read.  By default, the only value is "-unread" which will remo=\r
115 ve\r
116 > the unread tag.  Among other uses, this variable can be used to stop\r
117 > notmuch-show from modifying tags when message is shown (by setting the\r
118 > variable to an empty list).\r
119 > ---\r
120 >  emacs/notmuch-show.el |   12 ++++++++++--\r
121 >  1 files changed, 10 insertions(+), 2 deletions(-)\r
122 >\r
123 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
124 > index dcfc190..92a4beb 100644\r
125 > --- a/emacs/notmuch-show.el\r
126 > +++ b/emacs/notmuch-show.el\r
127 > @@ -183,6 +183,13 @@ provided with an MLA argument nor `completing-read' =\r
128 input."\r
129 >            notmuch-show-stash-mlarchive-link-alist))\r
130 >    :group 'notmuch-show)\r
131 >=20=20\r
132 > +(defcustom notmuch-show-mark-read-tags '("-unread")\r
133 > +  "List of tags to apply when message is read, ie. shown in notmuch-show\r
134 > +buffer."\r
135 > +  :type '(repeat string)\r
136 > +  :group 'notmuch-show)\r
137 > +\r
138 > +\r
139 >  (defmacro with-current-notmuch-show-message (&rest body)\r
140 >    "Evaluate body with current buffer set to the text of current message"\r
141 >    `(save-excursion\r
142 > @@ -1383,8 +1390,9 @@ current thread."\r
143 >    (notmuch-show-get-prop :headers-visible))\r
144 >=20=20\r
145 >  (defun notmuch-show-mark-read ()\r
146 > -  "Mark the current message as read."\r
147 > -  (notmuch-show-tag-message "-unread"))\r
148 > +  "Apply `notmuch-show-mark-read-tags' to the message."\r
149 > +  (when notmuch-show-mark-read-tags\r
150 > +    (apply notmuch-show-tag-message notmuch-show-mark-read-tags)))\r
151 \r
152  This needs to be (apply 'notmuch-show-tag-message ...)\r
153 >=20=20\r
154 >  ;; Functions for getting attributes of several messages in the current\r
155 >  ;; thread.\r
156 >\r
157 > --=20\r
158 > Best regards,                                         _     _\r
159 > .o. | Liege of Serenely Enlightened Majesty of      o' \,=3D./ `o\r
160 > ..o | Computer Science,  Micha=C5=82 =E2=80=9Cmina86=E2=80=9D Nazarewicz =\r
161    (o o)\r
162 > ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--\r