1 Return-Path: <dme@dme.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 151584196F2
\r
6 for <notmuch@notmuchmail.org>; Thu, 22 Apr 2010 01:24:13 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5
\r
12 tests=[BAYES_00=-1.9] autolearn=ham
\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 dgbHz-MJ+vrf for <notmuch@notmuchmail.org>;
\r
16 Thu, 22 Apr 2010 01:24:11 -0700 (PDT)
\r
17 Received: from mail-ww0-f53.google.com (mail-ww0-f53.google.com
\r
18 [74.125.82.53]) by olra.theworths.org (Postfix) with ESMTP id 5FC51431FC1 for
\r
19 <notmuch@notmuchmail.org>; Thu, 22 Apr 2010 01:24:11 -0700 (PDT)
\r
20 Received: by wwb28 with SMTP id 28so2049031wwb.26
\r
21 for <notmuch@notmuchmail.org>; Thu, 22 Apr 2010 01:24:10 -0700 (PDT)
\r
22 Received: by 10.216.87.75 with SMTP id x53mr2416615wee.144.1271924650426;
\r
23 Thu, 22 Apr 2010 01:24:10 -0700 (PDT)
\r
24 Received: from ut.hh.sledj.net (host83-217-165-81.dsl.vispa.com
\r
26 by mx.google.com with ESMTPS id n12sm3593014gve.0.2010.04.22.01.24.08
\r
27 (version=TLSv1/SSLv3 cipher=RC4-MD5);
\r
28 Thu, 22 Apr 2010 01:24:09 -0700 (PDT)
\r
29 Received: by ut.hh.sledj.net (Postfix, from userid 1000)
\r
30 id B412F594163; Thu, 22 Apr 2010 09:24:07 +0100 (BST)
\r
31 From: David Edmondson <dme@dme.org>
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [PATCH] emacs/notmuch-show.el: Add `notmuch-show-toggle-all' bound to
\r
35 Date: Thu, 22 Apr 2010 09:24:03 +0100
\r
36 Message-Id: <1271924643-7804-1-git-send-email-dme@dme.org>
\r
37 X-Mailer: git-send-email 1.7.0
\r
38 In-Reply-To: <87iq7kjz7c.fsf@yoom.home.cworth.org>
\r
39 References: <87iq7kjz7c.fsf@yoom.home.cworth.org>
\r
40 X-BeenThere: notmuch@notmuchmail.org
\r
41 X-Mailman-Version: 2.1.13
\r
43 List-Id: "Use and development of the notmuch mail system."
\r
44 <notmuch.notmuchmail.org>
\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
48 List-Post: <mailto:notmuch@notmuchmail.org>
\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
52 X-List-Received-Date: Thu, 22 Apr 2010 08:24:13 -0000
\r
54 `notmuch-show-toggle-all' changes the visibility all of the messages
\r
55 in the current thread. By default it makes all of the messages
\r
56 visible. With a prefix argument, it makes them all not visible.
\r
58 emacs/notmuch-show.el | 13 +++++++++++++
\r
59 1 files changed, 13 insertions(+), 0 deletions(-)
\r
61 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
62 index 916b39e..9775fb4 100644
\r
63 --- a/emacs/notmuch-show.el
\r
64 +++ b/emacs/notmuch-show.el
\r
65 @@ -526,6 +526,7 @@ function is used. "
\r
66 (define-key map "p" 'notmuch-show-previous-open-message)
\r
67 (define-key map (kbd "DEL") 'notmuch-show-rewind)
\r
68 (define-key map " " 'notmuch-show-advance-and-archive)
\r
69 + (define-key map (kbd "M-RET") 'notmuch-show-toggle-all)
\r
70 (define-key map (kbd "RET") 'notmuch-show-toggle-message)
\r
72 "Keymap for \"notmuch show\" buffers.")
\r
73 @@ -900,6 +901,18 @@ to stdout or stderr will appear in the *Messages* buffer."
\r
74 (not (plist-get props :message-visible))))
\r
75 (force-window-update))
\r
77 +(defun notmuch-show-toggle-all ()
\r
78 + "Change the visibility all of the messages in the current
\r
79 +thread. By default make all of the messages visible. With a
\r
80 +prefix argument, make them all not visible."
\r
83 + (goto-char (point-min))
\r
84 + (loop do (notmuch-show-message-visible (notmuch-show-get-message-properties)
\r
85 + (not current-prefix-arg))
\r
86 + until (not (notmuch-show-goto-message-next))))
\r
87 + (force-window-update))
\r
89 (defun notmuch-show-next-button ()
\r
90 "Advance point to the next button in the buffer."
\r