1 Return-Path: <markwalters1009@gmail.com>
\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 0383D429E43
\r
6 for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 10:39:35 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,
\r
14 RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id 79VDgXAYFQR6 for <notmuch@notmuchmail.org>;
\r
18 Sun, 29 Jan 2012 10:39:34 -0800 (PST)
\r
19 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com
\r
20 [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
21 (No client certificate requested)
\r
22 by olra.theworths.org (Postfix) with ESMTPS id 5CBBD429E3F
\r
23 for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 10:39:34 -0800 (PST)
\r
24 Received: by mail-wi0-f181.google.com with SMTP id hi8so2994807wib.26
\r
25 for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 10:39:34 -0800 (PST)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
27 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
28 bh=hs0iy7WMmE9chn11yMhNs+3x120hfjBNsgiFT6yiSLk=;
\r
29 b=OmVuBDDMSUJvc9XdvKb+bLF0waYCbeZEGJYRKD+n6mTc1gCx3e3x/+kSVgDuDz6ZMF
\r
30 +F149e300edimr10zT7ko+gf2K8xlzT9nZBpPgDOf+CuxspANi2X/ogRwMOfO8JK9fQi
\r
31 tetK7l/cj8nr0sxAGGzvECM+S3weT8pwQf1eo=
\r
32 Received: by 10.180.82.41 with SMTP id f9mr23029047wiy.7.1327862374124;
\r
33 Sun, 29 Jan 2012 10:39:34 -0800 (PST)
\r
34 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.
\r
35 [94.192.233.223]) by mx.google.com with ESMTPS id
\r
36 j16sm44638074wie.4.2012.01.29.10.39.32 (version=TLSv1/SSLv3 cipher=OTHER);
\r
37 Sun, 29 Jan 2012 10:39:33 -0800 (PST)
\r
38 From: Mark Walters <markwalters1009@gmail.com>
\r
39 To: notmuch@notmuchmail.org,
\r
41 Subject: [PATCH 7/7] emacs: show: recognize the exclude flag.
\r
42 Date: Sun, 29 Jan 2012 18:39:54 +0000
\r
43 Message-Id: <1327862394-14334-7-git-send-email-markwalters1009@gmail.com>
\r
44 X-Mailer: git-send-email 1.7.2.3
\r
45 In-Reply-To: <8762fu4aqt.fsf@qmul.ac.uk>
\r
46 References: <8762fu4aqt.fsf@qmul.ac.uk>
\r
47 X-BeenThere: notmuch@notmuchmail.org
\r
48 X-Mailman-Version: 2.1.13
\r
50 List-Id: "Use and development of the notmuch mail system."
\r
51 <notmuch.notmuchmail.org>
\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
55 List-Post: <mailto:notmuch@notmuchmail.org>
\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
59 X-List-Received-Date: Sun, 29 Jan 2012 18:39:35 -0000
\r
61 Show mode will recognize the exclude flag by not opening excluding
\r
62 messages by default, and will start at the first matching non-excluded
\r
63 message. If there are no matching non-excluded messages it will go to
\r
64 the first matching (necessarily excluded) message.
\r
66 emacs/notmuch-show.el | 18 +++++++++++++++++-
\r
67 1 files changed, 17 insertions(+), 1 deletions(-)
\r
69 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
70 index 84ac624..8efadf6 100644
\r
71 --- a/emacs/notmuch-show.el
\r
72 +++ b/emacs/notmuch-show.el
\r
73 @@ -905,7 +905,8 @@ current buffer, if possible."
\r
75 ;; Message visibility depends on whether it matched the search
\r
77 - (notmuch-show-message-visible msg (plist-get msg :match))))
\r
78 + (notmuch-show-message-visible msg (and (plist-get msg :match)
\r
79 + (not (plist-get msg :excluded))))))
\r
81 (defun notmuch-show-insert-tree (tree depth)
\r
82 "Insert the message tree TREE at depth DEPTH in the current thread."
\r
83 @@ -1015,6 +1016,9 @@ buffer."
\r
84 ;; Move straight to the first open message
\r
85 (unless (notmuch-show-message-visible-p)
\r
86 (notmuch-show-next-open-message))
\r
87 + (when (eq (point) (point-max))
\r
88 + (goto-char (point-min))
\r
89 + (notmuch-show-next-matching-message))
\r
91 ;; Set the header line to the subject of the first open message.
\r
92 (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-subject)))
\r
93 @@ -1417,6 +1421,18 @@ any effects from previous calls to
\r
94 (notmuch-show-message-adjust))
\r
95 (goto-char (point-max)))))
\r
97 +(defun notmuch-show-next-matching-message ()
\r
98 + "Show the next matching message."
\r
101 + (while (and (setq r (notmuch-show-goto-message-next))
\r
102 + (not (notmuch-show-get-prop :match))))
\r
105 + (notmuch-show-mark-read)
\r
106 + (notmuch-show-message-adjust))
\r
107 + (goto-char (point-max)))))
\r
109 (defun notmuch-show-previous-open-message ()
\r
110 "Show the previous message."
\r