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 E8735431FAF
\r
6 for <notmuch@notmuchmail.org>; Wed, 29 Feb 2012 01:16:15 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 AJvkGtki8cwH for <notmuch@notmuchmail.org>;
\r
17 Wed, 29 Feb 2012 01:16:15 -0800 (PST)
\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 3755E431FAE
\r
22 for <notmuch@notmuchmail.org>; Wed, 29 Feb 2012 01:16:15 -0800 (PST)
\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 1S2fdq-0005Vp-50; Wed, 29 Feb 2012 09:16:10 +0000
\r
27 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]
\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 1S2fdp-0005pg-QV; Wed, 29 Feb 2012 09:16:10 +0000
\r
32 From: Mark Walters <markwalters1009@gmail.com>
\r
33 To: notmuch@notmuchmail.org, Austin Clements <amdragon@MIT.EDU>
\r
34 Subject: Re: [Patch v6 12/13] emacs: show: recognize the exclude flag.
\r
35 In-Reply-To: <1330157204-26094-13-git-send-email-markwalters1009@gmail.com>
\r
36 References: <1330157204-26094-1-git-send-email-markwalters1009@gmail.com>
\r
37 <1330157204-26094-13-git-send-email-markwalters1009@gmail.com>
\r
38 User-Agent: Notmuch/0.11.1+202~g31eaf97 (http://notmuchmail.org) Emacs/23.2.1
\r
40 Date: Wed, 29 Feb 2012 09:17:56 +0000
\r
41 Message-ID: <87linmvvzv.fsf@qmul.ac.uk>
\r
43 Content-Type: text/plain; charset=us-ascii
\r
44 X-Sender-Host-Address: 94.192.233.223
\r
45 X-QM-SPAM-Info: Sender has good ham record. :)
\r
46 X-QM-Body-MD5: d9d1a01330af159c833c1b49d4d94cfb (of first 20000 bytes)
\r
47 X-SpamAssassin-Score: -1.8
\r
48 X-SpamAssassin-SpamBar: -
\r
49 X-SpamAssassin-Report: The QM spam filters have analysed this message to
\r
51 spam. We require at least 5.0 points to mark a message as spam.
\r
52 This message scored -1.8 points.
\r
53 Summary of the scoring:
\r
54 * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,
\r
56 * [138.37.6.40 listed in list.dnswl.org]
\r
57 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
\r
58 provider * (markwalters1009[at]gmail.com)
\r
59 * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
\r
61 * 0.5 AWL AWL: From: address is in the auto white-list
\r
62 X-QM-Scan-Virus: ClamAV says the message is clean
\r
63 X-BeenThere: notmuch@notmuchmail.org
\r
64 X-Mailman-Version: 2.1.13
\r
66 List-Id: "Use and development of the notmuch mail system."
\r
67 <notmuch.notmuchmail.org>
\r
68 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
70 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
71 List-Post: <mailto:notmuch@notmuchmail.org>
\r
72 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
73 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
74 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
75 X-List-Received-Date: Wed, 29 Feb 2012 09:16:16 -0000
\r
78 The rest of the series still applies to master (bf28c60b9) but this patch
\r
79 needed rebasing/restructuring to fit with the Austin's keep-state patch.
\r
81 I attach the new patch below. Of course, if it is easier I can resend
\r
88 >From 8324bc91e43d04e4c2813fa2a714766bcd057256 Mon Sep 17 00:00:00 2001
\r
89 From: Mark Walters <markwalters1009@gmail.com>
\r
90 Date: Sun, 29 Jan 2012 16:32:55 +0000
\r
91 Subject: [PATCH] emacs: show: recognize the exclude flag.
\r
93 Show mode will recognize the exclude flag by not opening excluding
\r
94 messages by default, and will start at the first matching non-excluded
\r
95 message. If there are no matching non-excluded messages it will go to
\r
96 the first matching (necessarily excluded) message.
\r
98 emacs/notmuch-show.el | 36 +++++++++++++++++++++++++++---------
\r
99 1 files changed, 27 insertions(+), 9 deletions(-)
\r
101 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
102 index 2cca2e2..72a8a6e 100644
\r
103 --- a/emacs/notmuch-show.el
\r
104 +++ b/emacs/notmuch-show.el
\r
105 @@ -981,7 +981,8 @@ current buffer, if possible."
\r
107 ;; Message visibility depends on whether it matched the search
\r
109 - (notmuch-show-message-visible msg (plist-get msg :match))))
\r
110 + (notmuch-show-message-visible msg (and (plist-get msg :match)
\r
111 + (not (plist-get msg :excluded))))))
\r
113 (defun notmuch-show-toggle-process-crypto ()
\r
114 "Toggle the processing of cryptographic MIME parts."
\r
115 @@ -1081,11 +1082,7 @@ function is used."
\r
116 notmuch-show-parent-buffer parent-buffer
\r
117 notmuch-show-query-context query-context)
\r
118 (notmuch-show-build-buffer)
\r
120 - ;; Move to the first open message and mark it read
\r
121 - (if (notmuch-show-message-visible-p)
\r
122 - (notmuch-show-mark-read)
\r
123 - (notmuch-show-next-open-message))))
\r
124 + (notmuch-show-goto-first-wanted-message)))
\r
126 (defun notmuch-show-build-buffer ()
\r
127 (let ((inhibit-read-only t))
\r
128 @@ -1167,9 +1164,7 @@ reset based on the original query."
\r
129 (notmuch-show-apply-state state)
\r
130 ;; We're resetting state, so navigate to the first open message
\r
131 ;; and mark it read, just like opening a new show buffer.
\r
132 - (if (notmuch-show-message-visible-p)
\r
133 - (notmuch-show-mark-read)
\r
134 - (notmuch-show-next-open-message)))))
\r
135 + (notmuch-show-goto-first-wanted-message))))
\r
137 (defvar notmuch-show-stash-map
\r
138 (let ((map (make-sparse-keymap)))
\r
139 @@ -1601,6 +1596,29 @@ to show, nil otherwise."
\r
140 (goto-char (point-max))))
\r
143 +(defun notmuch-show-next-matching-message ()
\r
144 + "Show the next matching message."
\r
147 + (while (and (setq r (notmuch-show-goto-message-next))
\r
148 + (not (notmuch-show-get-prop :match))))
\r
151 + (notmuch-show-mark-read)
\r
152 + (notmuch-show-message-adjust))
\r
153 + (goto-char (point-max)))))
\r
155 +(defun notmuch-show-goto-first-wanted-message ()
\r
156 + "Move to the first open message and mark it read"
\r
157 + (goto-char (point-min))
\r
158 + (if (notmuch-show-message-visible-p)
\r
159 + (notmuch-show-mark-read)
\r
160 + (notmuch-show-next-open-message))
\r
162 + (goto-char (point-min))
\r
163 + (unless (notmuch-show-get-prop :match)
\r
164 + (notmuch-show-next-matching-message))))
\r
166 (defun notmuch-show-previous-open-message ()
\r
167 "Show the previous open message."
\r