1 Return-Path: <amdragon@mit.edu>
\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 D0438431FAF
\r
6 for <notmuch@notmuchmail.org>; Mon, 6 Aug 2012 09:28:47 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\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 jUD3FjhEroXj for <notmuch@notmuchmail.org>;
\r
16 Mon, 6 Aug 2012 09:28:47 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 2768B431FAE
\r
20 for <notmuch@notmuchmail.org>; Mon, 6 Aug 2012 09:28:47 -0700 (PDT)
\r
21 X-AuditID: 1209190c-b7f806d000006b87-84-501ff0becde6
\r
22 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])
\r
23 by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 8F.69.27527.EB0FF105; Mon, 6 Aug 2012 12:28:46 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id q76GSj3B020344;
\r
27 Mon, 6 Aug 2012 12:28:46 -0400
\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q76GSiC5015768
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Mon, 6 Aug 2012 12:28:45 -0400 (EDT)
\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1SyQAe-00031q-1f; Mon, 06 Aug 2012 12:28:44 -0400
\r
37 Date: Mon, 6 Aug 2012 12:28:44 -0400
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: Michal Nazarewicz <mpn@google.com>
\r
40 Subject: Re: [PATCH] notmuch-show: add notmuch-show-auto-mark-read option
\r
41 Message-ID: <20120806162843.GJ22601@mit.edu>
\r
43 <7c2931eb4d34ff78e4c73d721bc00dc60d185e6a.1344260116.git.mina86@mina86.com>
\r
45 Content-Type: text/plain; charset=us-ascii
\r
46 Content-Disposition: inline
\r
48 <7c2931eb4d34ff78e4c73d721bc00dc60d185e6a.1344260116.git.mina86@mina86.com>
\r
49 User-Agent: Mutt/1.5.21 (2010-09-15)
\r
50 X-Brightmail-Tracker:
\r
51 H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42IRYrdT0d33QT7AoPOBusWr733sFtdvzmR2
\r
52 YPJYsKnU49mqW8wBTFFcNimpOZllqUX6dglcGc3HVrIU7OGvmPPiAmsD4zGeLkZODgkBE4nP
\r
53 39rYIWwxiQv31rN1MXJxCAnsY5TYM/EvI4SznlHi+935rBDOCSaJX9OPMUE4Sxgldj/oZALp
\r
54 ZxFQkVhybh0ziM0moCGxbf9yRhBbREBN4uKfx2A1zALSEt9+N4PZwgKeEv/m/AOaysHBK6Aj
\r
55 cWG9OkhYSCBc4n/nIjYQm1dAUOLkzCcsEK1aEjf+vWQCKQcZs/wfB0iYUyBCYtu8v2AfiAJd
\r
56 MOXkNrYJjEKzkHTPQtI9C6F7ASPzKkbZlNwq3dzEzJzi1GTd4uTEvLzUIl1DvdzMEr3UlNJN
\r
57 jKCg5pTk2cH45qDSIUYBDkYlHt5bBvIBQqyJZcWVuYcYJTmYlER5Y98BhfiS8lMqMxKLM+KL
\r
58 SnNSiw8xSnAwK4nw1iwEyvGmJFZWpRblw6SkOViUxHkvp9z0FxJITyxJzU5NLUgtgsnKcHAo
\r
59 SfA+eQ/UKFiUmp5akZaZU4KQZuLgBBnOAzT8CEgNb3FBYm5xZjpE/hSjopQ4rzAwbQgJgCQy
\r
60 SvPgemFJ5xWjONArwryLQdp5gAkLrvsV0GAmoMHe8nIgg0sSEVJSDYzSOWcLnm/ws4v/O5Hb
\r
61 7XtgzUp1oerfc5yz/hWe8c7dZSO6vivqzduUn4sWSDEHHivcunfvvanXmcuunVBOO3Tqw+39
\r
62 RRfOHonndbbguC7zSMtz/9Xdh7odrPedvffw6oH9GnNl7hW0f++yd1kU/cBq3nqf1i9Tm/4J
\r
63 tesKuolIJ07oFTqjF1GjxFKckWioxVxUnAgAvJG5shUDAAA=
\r
64 Cc: notmuch@notmuchmail.org
\r
65 X-BeenThere: notmuch@notmuchmail.org
\r
66 X-Mailman-Version: 2.1.13
\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: Mon, 06 Aug 2012 16:28:47 -0000
\r
79 LGTM, though I wonder: Is this actually what you want, or would you be
\r
80 happy with automatic read marking if it followed a different pattern
\r
81 (perhaps a more predictable pattern)?
\r
83 Quoth Michal Nazarewicz on Aug 06 at 4:20 pm:
\r
84 > From: Michal Nazarewicz <mina86@mina86.com>
\r
86 > Setting `notmuch-show-auto-mark-read' to nil stops notmuch-show from marking
\r
87 > the message as read (by removing the unread tag). Inteded for people who
\r
88 > like to mark messages read explicitly.
\r
90 > emacs/notmuch-show.el | 16 +++++++++++++---
\r
91 > 1 files changed, 13 insertions(+), 3 deletions(-)
\r
93 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
94 > index d318430..85a17b1 100644
\r
95 > --- a/emacs/notmuch-show.el
\r
96 > +++ b/emacs/notmuch-show.el
\r
97 > @@ -183,6 +183,14 @@ provided with an MLA argument nor `completing-read' input."
\r
98 > notmuch-show-stash-mlarchive-link-alist))
\r
99 > :group 'notmuch-show)
\r
101 > +(defcustom notmuch-show-auto-mark-read t
\r
102 > + "Whether to automatically mark message as read when it is shown. If
\r
103 > +nil, message needs to be marked as read manually for instance by
\r
104 > +removing the unread tag."
\r
106 > + :group 'notmuch-show)
\r
109 > (defmacro with-current-notmuch-show-message (&rest body)
\r
110 > "Evaluate body with current buffer set to the text of current message"
\r
112 > @@ -1374,9 +1382,11 @@ current thread."
\r
113 > "Are the headers of the current message visible?"
\r
114 > (notmuch-show-get-prop :headers-visible))
\r
116 > -(defun notmuch-show-mark-read ()
\r
117 > - "Mark the current message as read."
\r
118 > - (notmuch-show-tag-message "-unread"))
\r
119 > +(defun notmuch-show-mark-read (&optional force)
\r
120 > + "Mark the current message as read if FORCE or
\r
121 > +`notmuch-show-auto-mark-read' is non-nil."
\r
122 > + (when (or force notmuch-show-auto-mark-read)
\r
123 > + (notmuch-show-tag-message "-unread")))
\r
125 > ;; Functions for getting attributes of several messages in the current
\r