1 Return-Path: <tomi.ollila@iki.fi>
\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 36C4D431FC0
\r
6 for <notmuch@notmuchmail.org>; Tue, 7 Aug 2012 09:38:50 -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 bIhelswUOMw9 for <notmuch@notmuchmail.org>;
\r
16 Tue, 7 Aug 2012 09:38:49 -0700 (PDT)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 79A36431FAF
\r
19 for <notmuch@notmuchmail.org>; Tue, 7 Aug 2012 09:38:49 -0700 (PDT)
\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)
\r
21 id 782F11002A4; Tue, 7 Aug 2012 19:38:59 +0300 (EEST)
\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
23 To: Mark Walters <markwalters1009@gmail.com>,
\r
24 Michal Nazarewicz <mpn@google.com>, notmuch@notmuchmail.org
\r
25 Subject: Re: [PATCH] notmuch-show: add notmuch-show-auto-mark-read option
\r
26 In-Reply-To: <87mx26bt2z.fsf@qmul.ac.uk>
\r
28 <7c2931eb4d34ff78e4c73d721bc00dc60d185e6a.1344260116.git.mina86@mina86.com>
\r
29 <874noepwez.fsf@qmul.ac.uk> <xa1tpq72d8f0.fsf@mina86.com>
\r
30 <87mx26bt2z.fsf@qmul.ac.uk>
\r
31 User-Agent: Notmuch/0.13.2+128~g07453d8 (http://notmuchmail.org) Emacs/23.1.1
\r
32 (x86_64-redhat-linux-gnu)
\r
33 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
34 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
35 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
36 Date: Tue, 07 Aug 2012 19:38:59 +0300
\r
37 Message-ID: <m2r4ri8xng.fsf@guru.guru-group.fi>
\r
39 Content-Type: text/plain; charset=utf-8
\r
40 Content-Transfer-Encoding: quoted-printable
\r
41 X-BeenThere: notmuch@notmuchmail.org
\r
42 X-Mailman-Version: 2.1.13
\r
44 List-Id: "Use and development of the notmuch mail system."
\r
45 <notmuch.notmuchmail.org>
\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
49 List-Post: <mailto:notmuch@notmuchmail.org>
\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
53 X-List-Received-Date: Tue, 07 Aug 2012 16:38:50 -0000
\r
55 On Tue, Aug 07 2012, Mark Walters <markwalters1009@gmail.com> wrote:
\r
57 > On Tue, 07 Aug 2012, Michal Nazarewicz <mpn@google.com> wrote:
\r
61 >> Mark Walters <markwalters1009@gmail.com> writes:
\r
62 >>> As an alternative approach would allowing a list of tags (or even tag
\r
63 >>> changes) to apply when a message is "read" do what you want and be more
\r
66 >> Something like the following (not tested)?
\r
68 > Yes this was what I had in mind. I like this (both the symmetry with
\r
69 > reply tags and the added flexibility) but I will let others
\r
70 > comment. (There is one small bug in your draft: see below)
\r
72 I like the idea -- and the draft!
\r
82 >> From: Michal Nazarewicz <mina86@mina86.com>
\r
83 >> Date: Mon, 6 Aug 2012 15:31:20 +0200
\r
84 >> Subject: [PATCH] notmuch-show: add notmuch-show-mark-read-tags option
\r
86 >> The `notmuch-show-mark-read-tags' lists tags that are to be applied when
\r
87 >> message is read. By default, the only value is "-unread" which will rem=
\r
89 >> the unread tag. Among other uses, this variable can be used to stop
\r
90 >> notmuch-show from modifying tags when message is shown (by setting the
\r
91 >> variable to an empty list).
\r
93 >> emacs/notmuch-show.el | 12 ++++++++++--
\r
94 >> 1 files changed, 10 insertions(+), 2 deletions(-)
\r
96 >> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
97 >> index dcfc190..92a4beb 100644
\r
98 >> --- a/emacs/notmuch-show.el
\r
99 >> +++ b/emacs/notmuch-show.el
\r
100 >> @@ -183,6 +183,13 @@ provided with an MLA argument nor `completing-read'=
\r
102 >> notmuch-show-stash-mlarchive-link-alist))
\r
103 >> :group 'notmuch-show)
\r
105 >> +(defcustom notmuch-show-mark-read-tags '("-unread")
\r
106 >> + "List of tags to apply when message is read, ie. shown in notmuch-show
\r
108 >> + :type '(repeat string)
\r
109 >> + :group 'notmuch-show)
\r
112 >> (defmacro with-current-notmuch-show-message (&rest body)
\r
113 >> "Evaluate body with current buffer set to the text of current message"
\r
114 >> `(save-excursion
\r
115 >> @@ -1383,8 +1390,9 @@ current thread."
\r
116 >> (notmuch-show-get-prop :headers-visible))
\r
118 >> (defun notmuch-show-mark-read ()
\r
119 >> - "Mark the current message as read."
\r
120 >> - (notmuch-show-tag-message "-unread"))
\r
121 >> + "Apply `notmuch-show-mark-read-tags' to the message."
\r
122 >> + (when notmuch-show-mark-read-tags
\r
123 >> + (apply notmuch-show-tag-message notmuch-show-mark-read-tags)))
\r
125 > This needs to be (apply 'notmuch-show-tag-message ...)
\r
127 >> ;; Functions for getting attributes of several messages in the current
\r
131 >> Best regards, _ _
\r
132 >> .o. | Liege of Serenely Enlightened Majesty of o' \,=3D./ `o
\r
133 >> ..o | Computer Science, Micha=C5=82 =E2=80=9Cmina86=E2=80=9D Nazarewicz=
\r
135 >> ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--
\r
136 > _______________________________________________
\r
137 > notmuch mailing list
\r
138 > notmuch@notmuchmail.org
\r
139 > http://notmuchmail.org/mailman/listinfo/notmuch
\r