Re: [PATCH v4 08/16] reorganize indexing of multipart/signed and multipart/encrypted
[notmuch-archives.git] / 6a / eef78cfe2e664abd9fc01f4b109db075d6b087
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 DCF14431FBF\r
6         for <notmuch@notmuchmail.org>; Sat, 25 Feb 2012 19:17:55 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \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 jz145VHHhhoQ for <notmuch@notmuchmail.org>;\r
18         Sat, 25 Feb 2012 19:17:55 -0800 (PST)\r
19 Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
20         [74.125.82.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 4B4FA431FAE\r
23         for <notmuch@notmuchmail.org>; Sat, 25 Feb 2012 19:17:55 -0800 (PST)\r
24 Received: by werp13 with SMTP id p13so2550292wer.26\r
25         for <notmuch@notmuchmail.org>; Sat, 25 Feb 2012 19:17:54 -0800 (PST)\r
26 Received-SPF: pass (google.com: domain of markwalters1009@gmail.com designates\r
27         10.180.101.200 as permitted sender) client-ip=10.180.101.200; \r
28 Authentication-Results: mr.google.com; spf=pass (google.com: domain of\r
29         markwalters1009@gmail.com designates 10.180.101.200 as\r
30         permitted sender) smtp.mail=markwalters1009@gmail.com;\r
31         dkim=pass header.i=markwalters1009@gmail.com\r
32 Received: from mr.google.com ([10.180.101.200])\r
33         by 10.180.101.200 with SMTP id fi8mr16926240wib.20.1330226274182\r
34         (num_hops = 1); Sat, 25 Feb 2012 19:17:54 -0800 (PST)\r
35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
36         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
37         bh=y8Cn2mSbzbMeIcOfFPJoIgXa1ASnjb9usGZdKfkhBvo=;\r
38         b=tHR+E+8Ys+JVjnAcOL7P+yJwn1frL4UL5aJANQE05jtsqoA9R2lz45i+OJyxgw/io7\r
39         h/Oy5VkR5Stp8Vimi9OEUucIEm7EpgNtOmXppjwsIXjYHFILyWYw/IPthH2EjX4FOszR\r
40         kDkLO9XfO0Y71I5UKEGD00/hcJBi+pN8PlKNw=\r
41 Received: by 10.180.101.200 with SMTP id fi8mr9156976wib.20.1330157154032;\r
42         Sat, 25 Feb 2012 00:05:54 -0800 (PST)\r
43 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
44  [94.192.233.223])      by mx.google.com with ESMTPS id\r
45  m16sm20600151wie.9.2012.02.25.00.05.52 (version=TLSv1/SSLv3 cipher=OTHER);\r
46         Sat, 25 Feb 2012 00:05:53 -0800 (PST)\r
47 From: Mark Walters <markwalters1009@gmail.com>\r
48 To: notmuch@notmuchmail.org,\r
49         Austin Clements <amdragon@MIT.EDU>\r
50 Subject: [Patch v6 12/13] emacs: show: recognize the exclude flag.\r
51 Date: Sat, 25 Feb 2012 08:06:43 +0000\r
52 Message-Id: <1330157204-26094-13-git-send-email-markwalters1009@gmail.com>\r
53 X-Mailer: git-send-email 1.7.2.3\r
54 In-Reply-To: <1330157204-26094-1-git-send-email-markwalters1009@gmail.com>\r
55 References: <1330157204-26094-1-git-send-email-markwalters1009@gmail.com>\r
56 X-BeenThere: notmuch@notmuchmail.org\r
57 X-Mailman-Version: 2.1.13\r
58 Precedence: list\r
59 List-Id: "Use and development of the notmuch mail system."\r
60         <notmuch.notmuchmail.org>\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
64 List-Post: <mailto:notmuch@notmuchmail.org>\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
67         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
68 X-List-Received-Date: Sun, 26 Feb 2012 03:17:56 -0000\r
69 \r
70 Show mode will recognize the exclude flag by not opening excluding\r
71 messages by default, and will start at the first matching non-excluded\r
72 message. If there are no matching non-excluded messages it will go to\r
73 the first matching (necessarily excluded) message.\r
74 ---\r
75  emacs/notmuch-show.el |   19 ++++++++++++++++++-\r
76  1 files changed, 18 insertions(+), 1 deletions(-)\r
77 \r
78 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
79 index aa9ccee..96b0c71 100644\r
80 --- a/emacs/notmuch-show.el\r
81 +++ b/emacs/notmuch-show.el\r
82 @@ -948,7 +948,8 @@ current buffer, if possible."\r
83  \r
84      ;; Message visibility depends on whether it matched the search\r
85      ;; criteria.\r
86 -    (notmuch-show-message-visible msg (plist-get msg :match))))\r
87 +    (notmuch-show-message-visible msg (and (plist-get msg :match)\r
88 +                                          (not (plist-get msg :excluded))))))\r
89  \r
90  (defun notmuch-show-toggle-process-crypto ()\r
91    "Toggle the processing of cryptographic MIME parts."\r
92 @@ -1079,6 +1080,10 @@ function is used."\r
93      ;; Move straight to the first open message\r
94      (unless (notmuch-show-message-visible-p)\r
95        (notmuch-show-next-open-message))\r
96 +    (when (eobp)\r
97 +      (goto-char (point-min))\r
98 +      (unless (notmuch-show-get-prop :match)\r
99 +       (notmuch-show-next-matching-message)))\r
100  \r
101      ;; Set the header line to the subject of the first open message.\r
102      (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-pretty-subject)))\r
103 @@ -1557,6 +1562,18 @@ to show, nil otherwise."\r
104         (goto-char (point-max))))\r
105      r))\r
106  \r
107 +(defun notmuch-show-next-matching-message ()\r
108 +  "Show the next matching message."\r
109 +  (interactive)\r
110 +  (let (r)\r
111 +    (while (and (setq r (notmuch-show-goto-message-next))\r
112 +               (not (notmuch-show-get-prop :match))))\r
113 +    (if r\r
114 +       (progn\r
115 +         (notmuch-show-mark-read)\r
116 +         (notmuch-show-message-adjust))\r
117 +      (goto-char (point-max)))))\r
118 +\r
119  (defun notmuch-show-previous-open-message ()\r
120    "Show the previous open message."\r
121    (interactive)\r
122 -- \r
123 1.7.2.3\r
124 \r