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 A5077421192
\r
6 for <notmuch@notmuchmail.org>; Wed, 15 Feb 2012 01:03:51 -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 xehkJ7nAqChw for <notmuch@notmuchmail.org>;
\r
18 Wed, 15 Feb 2012 01:03:50 -0800 (PST)
\r
19 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com
\r
20 [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
21 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
22 72E4C41ED8A for <notmuch@notmuchmail.org>; Wed, 15 Feb 2012 01:03:21 -0800
\r
24 Received: by mail-ww0-f45.google.com with SMTP id dt12so647956wgb.2
\r
25 for <notmuch@notmuchmail.org>; Wed, 15 Feb 2012 01:03:21 -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=y8Cn2mSbzbMeIcOfFPJoIgXa1ASnjb9usGZdKfkhBvo=;
\r
29 b=OX+sI66hnqkk2247rAaBhFDlVOrYRKw0X8MjApEnOCazhl9jZEbBcD4QlwlyU/0JwF
\r
30 32APfFqFwXGkh+nQSvm9Un09Yo8vPofWoFVieB2YtUlgG0Vj+3sTfCQszJNNWHiANowd
\r
31 fJuTqlgtgBo5E5c+RrtswKIOhj2nCtrLs6YBw=
\r
32 Received: by 10.180.86.9 with SMTP id l9mr34218882wiz.15.1329296601195;
\r
33 Wed, 15 Feb 2012 01:03:21 -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 da8sm32097210wib.6.2012.02.15.01.03.19 (version=TLSv1/SSLv3 cipher=OTHER);
\r
37 Wed, 15 Feb 2012 01:03:20 -0800 (PST)
\r
38 From: Mark Walters <markwalters1009@gmail.com>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [RFC PATCH v5 11/11] emacs: show: recognize the exclude flag.
\r
41 Date: Wed, 15 Feb 2012 09:03:39 +0000
\r
42 Message-Id: <1329296619-7463-12-git-send-email-markwalters1009@gmail.com>
\r
43 X-Mailer: git-send-email 1.7.2.3
\r
44 In-Reply-To: <1329296619-7463-1-git-send-email-markwalters1009@gmail.com>
\r
45 References: <1329296619-7463-1-git-send-email-markwalters1009@gmail.com>
\r
46 X-BeenThere: notmuch@notmuchmail.org
\r
47 X-Mailman-Version: 2.1.13
\r
49 List-Id: "Use and development of the notmuch mail system."
\r
50 <notmuch.notmuchmail.org>
\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
54 List-Post: <mailto:notmuch@notmuchmail.org>
\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
58 X-List-Received-Date: Wed, 15 Feb 2012 09:03:52 -0000
\r
60 Show mode will recognize the exclude flag by not opening excluding
\r
61 messages by default, and will start at the first matching non-excluded
\r
62 message. If there are no matching non-excluded messages it will go to
\r
63 the first matching (necessarily excluded) message.
\r
65 emacs/notmuch-show.el | 19 ++++++++++++++++++-
\r
66 1 files changed, 18 insertions(+), 1 deletions(-)
\r
68 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
69 index aa9ccee..96b0c71 100644
\r
70 --- a/emacs/notmuch-show.el
\r
71 +++ b/emacs/notmuch-show.el
\r
72 @@ -948,7 +948,8 @@ current buffer, if possible."
\r
74 ;; Message visibility depends on whether it matched the search
\r
76 - (notmuch-show-message-visible msg (plist-get msg :match))))
\r
77 + (notmuch-show-message-visible msg (and (plist-get msg :match)
\r
78 + (not (plist-get msg :excluded))))))
\r
80 (defun notmuch-show-toggle-process-crypto ()
\r
81 "Toggle the processing of cryptographic MIME parts."
\r
82 @@ -1079,6 +1080,10 @@ function is used."
\r
83 ;; Move straight to the first open message
\r
84 (unless (notmuch-show-message-visible-p)
\r
85 (notmuch-show-next-open-message))
\r
87 + (goto-char (point-min))
\r
88 + (unless (notmuch-show-get-prop :match)
\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-pretty-subject)))
\r
93 @@ -1557,6 +1562,18 @@ to show, nil otherwise."
\r
94 (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 open message."
\r