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 C40EE431FC0
\r
6 for <notmuch@notmuchmail.org>; Tue, 7 Aug 2012 08:51:28 -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 aYFT2P7iTJHi for <notmuch@notmuchmail.org>;
\r
16 Tue, 7 Aug 2012 08:51:28 -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 DD6C6431FAF
\r
19 for <notmuch@notmuchmail.org>; Tue, 7 Aug 2012 08:51:27 -0700 (PDT)
\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)
\r
21 id E56831002A4; Tue, 7 Aug 2012 18:51:37 +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: <874noepwez.fsf@qmul.ac.uk>
\r
28 <7c2931eb4d34ff78e4c73d721bc00dc60d185e6a.1344260116.git.mina86@mina86.com>
\r
29 <874noepwez.fsf@qmul.ac.uk>
\r
30 User-Agent: Notmuch/0.13.2+128~g07453d8 (http://notmuchmail.org) Emacs/23.1.1
\r
31 (x86_64-redhat-linux-gnu)
\r
32 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
33 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
34 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
35 Date: Tue, 07 Aug 2012 18:51:37 +0300
\r
36 Message-ID: <m2ehniog3a.fsf@guru.guru-group.fi>
\r
38 Content-Type: text/plain; charset=us-ascii
\r
39 X-BeenThere: notmuch@notmuchmail.org
\r
40 X-Mailman-Version: 2.1.13
\r
42 List-Id: "Use and development of the notmuch mail system."
\r
43 <notmuch.notmuchmail.org>
\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
45 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
47 List-Post: <mailto:notmuch@notmuchmail.org>
\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
51 X-List-Received-Date: Tue, 07 Aug 2012 15:51:28 -0000
\r
53 On Tue, Aug 07 2012, Mark Walters <markwalters1009@gmail.com> wrote:
\r
55 > On Mon, 06 Aug 2012, Michal Nazarewicz <mpn@google.com> wrote:
\r
56 >> From: Michal Nazarewicz <mina86@mina86.com>
\r
58 >> Setting `notmuch-show-auto-mark-read' to nil stops notmuch-show from marking
\r
59 >> the message as read (by removing the unread tag). Inteded for people who
\r
60 >> like to mark messages read explicitly.
\r
62 >> emacs/notmuch-show.el | 16 +++++++++++++---
\r
63 >> 1 files changed, 13 insertions(+), 3 deletions(-)
\r
65 >> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
66 >> index d318430..85a17b1 100644
\r
67 >> --- a/emacs/notmuch-show.el
\r
68 >> +++ b/emacs/notmuch-show.el
\r
69 >> @@ -183,6 +183,14 @@ provided with an MLA argument nor `completing-read' input."
\r
70 >> notmuch-show-stash-mlarchive-link-alist))
\r
71 >> :group 'notmuch-show)
\r
73 >> +(defcustom notmuch-show-auto-mark-read t
\r
74 >> + "Whether to automatically mark message as read when it is shown. If
\r
75 >> +nil, message needs to be marked as read manually for instance by
\r
76 >> +removing the unread tag."
\r
78 >> + :group 'notmuch-show)
\r
81 >> (defmacro with-current-notmuch-show-message (&rest body)
\r
82 >> "Evaluate body with current buffer set to the text of current message"
\r
84 >> @@ -1374,9 +1382,11 @@ current thread."
\r
85 >> "Are the headers of the current message visible?"
\r
86 >> (notmuch-show-get-prop :headers-visible))
\r
88 >> -(defun notmuch-show-mark-read ()
\r
89 >> - "Mark the current message as read."
\r
90 >> - (notmuch-show-tag-message "-unread"))
\r
91 >> +(defun notmuch-show-mark-read (&optional force)
\r
92 >> + "Mark the current message as read if FORCE or
\r
93 >> +`notmuch-show-auto-mark-read' is non-nil."
\r
94 >> + (when (or force notmuch-show-auto-mark-read)
\r
95 >> + (notmuch-show-tag-message "-unread")))
\r
98 > As an alternative approach would allowing a list of tags (or even tag
\r
99 > changes) to apply when a message is "read" do what you want and be more
\r
102 That's a great idea -- better than mine (just a variable which informs
\r
103 which tag is to be removed) .. something like:
\r
105 (defcustom notmuch-message-read-tag-changes '("-unread") "docstring" ...)
\r
107 Then one can have e.g.
\r
109 '() -- for no tag changes
\r
110 '("-inbox" "-unread" "+read")
\r
111 '("-postilaatikko" "-lukematon" "+luettu") -- the above in finnish.
\r
117 > I am thinking of something roughly analogous to
\r
118 > notmuch-message-replied-tags. I can imagine some people would like to
\r
119 > remove the inbox tag automatically for example. (And since we sync with
\r
120 > maildir flags the exact tag name does matter).
\r
122 > I agree with Austin that the current unread marking is a little
\r
123 > weird/unpredictable (eg notmuch-show-next-message marks a message read
\r
124 > even if it is closed) but I don't think fixing that helps your use.
\r
133 > _______________________________________________
\r
134 > notmuch mailing list
\r
135 > notmuch@notmuchmail.org
\r
136 > http://notmuchmail.org/mailman/listinfo/notmuch
\r