1 Return-Path: <pieter@praet.org>
\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 15665431FB6
\r
6 for <notmuch@notmuchmail.org>; Wed, 22 Feb 2012 10:46:15 -0800 (PST)
\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 cckw8weR4PF2 for <notmuch@notmuchmail.org>;
\r
16 Wed, 22 Feb 2012 10:46:14 -0800 (PST)
\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com
\r
18 [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
19 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
20 BAD50431FD5 for <notmuch@notmuchmail.org>; Wed, 22 Feb 2012 10:46:00 -0800
\r
22 Received: by mail-ww0-f45.google.com with SMTP id dt12so311625wgb.2
\r
23 for <notmuch@notmuchmail.org>; Wed, 22 Feb 2012 10:46:00 -0800 (PST)
\r
24 Received-SPF: pass (google.com: domain of pieter@praet.org designates
\r
25 10.180.74.177 as permitted sender) client-ip=10.180.74.177;
\r
26 Authentication-Results: mr.google.com;
\r
27 spf=pass (google.com: domain of pieter@praet.org
\r
28 designates 10.180.74.177 as permitted sender)
\r
29 smtp.mail=pieter@praet.org
\r
30 Received: from mr.google.com ([10.180.74.177])
\r
31 by 10.180.74.177 with SMTP id u17mr38299331wiv.13.1329936360490
\r
32 (num_hops = 1); Wed, 22 Feb 2012 10:46:00 -0800 (PST)
\r
34 Received: by 10.180.74.177 with SMTP id u17mr31665765wiv.13.1329936360395;
\r
35 Wed, 22 Feb 2012 10:46:00 -0800 (PST)
\r
36 Received: from localhost ([109.131.181.26])
\r
37 by mx.google.com with ESMTPS id y1sm74830307wiw.6.2012.02.22.10.45.59
\r
38 (version=TLSv1/SSLv3 cipher=OTHER);
\r
39 Wed, 22 Feb 2012 10:46:00 -0800 (PST)
\r
40 From: Pieter Praet <pieter@praet.org>
\r
41 To: Notmuch Mail <notmuch@notmuchmail.org>
\r
42 Subject: [PATCH v2 7/7] emacs: `notmuch-show-toggle-visibility-messages' with
\r
43 prefix arg filters by tag
\r
44 Date: Wed, 22 Feb 2012 19:43:34 +0100
\r
45 Message-Id: <1329936214-30959-7-git-send-email-pieter@praet.org>
\r
46 X-Mailer: git-send-email 1.7.8.1
\r
47 In-Reply-To: <1327469139-1968-1-git-send-email-pieter@praet.org>
\r
48 References: <1327469139-1968-1-git-send-email-pieter@praet.org>
\r
50 ALoCoQkFa7B6XS5SkhftDbvaGgF3Ka4PuK1L4nqzD+nR1rrM3Man/DdsSv8AJfvgfF+x7JMCOTVa
\r
51 X-BeenThere: notmuch@notmuchmail.org
\r
52 X-Mailman-Version: 2.1.13
\r
54 List-Id: "Use and development of the notmuch mail system."
\r
55 <notmuch.notmuchmail.org>
\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
59 List-Post: <mailto:notmuch@notmuchmail.org>
\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
62 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
63 X-List-Received-Date: Wed, 22 Feb 2012 18:46:15 -0000
\r
65 * emacs/notmuch-show.el (notmuch-show-toggle-visibility-messages):
\r
66 When provided with a prefix arg, prompt the user for a tag.
\r
67 Show all messages that have it and hide those that don't.
\r
69 emacs/notmuch-show.el | 13 ++++++++++---
\r
70 1 files changed, 10 insertions(+), 3 deletions(-)
\r
72 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
73 index 82d4265..b5e482b 100644
\r
74 --- a/emacs/notmuch-show.el
\r
75 +++ b/emacs/notmuch-show.el
\r
78 (declare-function notmuch-call-notmuch-process "notmuch" (&rest args))
\r
79 (declare-function notmuch-fontify-headers "notmuch" nil)
\r
80 +(declare-function notmuch-select-tag-with-completion "notmuch" (prompt &rest search-terms))
\r
81 (declare-function notmuch-read-tag-changes "notmuch" (&optional initial-input &rest search-terms))
\r
82 (declare-function notmuch-search-next-thread "notmuch" nil)
\r
83 (declare-function notmuch-search-show-thread "notmuch" nil)
\r
84 @@ -1670,13 +1671,19 @@ (defun notmuch-show-toggle-visibility-message ()
\r
86 (defun notmuch-show-toggle-visibility-messages ()
\r
87 "Toggle the visibility of all messages in the current thread.
\r
88 -If the current message is visible, hide all messages -- and vice versa."
\r
89 +If the current message is visible, hide all messages -- and vice versa.
\r
91 +With a prefix argument, prompt for a tag and only show messages which have it."
\r
93 - (let ((visible-p (notmuch-show-message-visible-p)))
\r
94 + (let ((visible-p (notmuch-show-message-visible-p))
\r
95 + (filter (if current-prefix-arg
\r
96 + (notmuch-select-tag-with-completion "Filter by tag: "))))
\r
98 (lambda () (notmuch-show-message-visible
\r
99 (notmuch-show-get-message-properties)
\r
100 - (not visible-p)))))
\r
101 + (if current-prefix-arg
\r
102 + (member filter (notmuch-show-get-tags))
\r
103 + (not visible-p))))))
\r
105 ;; Put the current message properly into focus, but don't
\r
106 ;; obscure the presence of previous messages in the thread.
\r