1 Return-Path: <notmuch@dima.secretsauce.net>
\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 8086F429E25
\r
6 for <notmuch@notmuchmail.org>; Mon, 6 Jun 2011 23:37:30 -0700 (PDT)
\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=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7]
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id FMGo6+GB1VVp for <notmuch@notmuchmail.org>;
\r
17 Mon, 6 Jun 2011 23:37:29 -0700 (PDT)
\r
18 Received: from new1.smtp.messagingengine.com (new1.smtp.messagingengine.com
\r
20 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
\r
21 (No client certificate requested)
\r
22 by olra.theworths.org (Postfix) with ESMTPS id AF565431FB6
\r
23 for <notmuch@notmuchmail.org>; Mon, 6 Jun 2011 23:37:29 -0700 (PDT)
\r
24 Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41])
\r
25 by gateway1.messagingengine.com (Postfix) with ESMTP id C7BC62077C
\r
26 for <notmuch@notmuchmail.org>; Tue, 7 Jun 2011 02:37:28 -0400 (EDT)
\r
27 Received: from frontend2.messagingengine.com ([10.202.2.161])
\r
28 by compute1.internal (MEProxy); Tue, 07 Jun 2011 02:37:28 -0400
\r
29 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com;
\r
30 h=date:from:to:subject:message-id:in-reply-to:references:mime-version:content-type; s=smtpout; bh=WT+y3rCVxYGq/HIav8KTE57zgHg=;
\r
31 b=hFu6qjc5ESzeGcSLavQmheRcYvnQQ+WXi3XYXO35E+m3XyYGEQFMslFh8SsKuNnEQGvo5fjL1CdGnmul3DYHyAMm8Dv4nOjZN9hIg8wWg7wWuGwGkl7BaqC5DZNg6MESZeSl0CYiIAwzm62kDs+EzFt+Z3Z2rX67YoZkBYf7vxM=
\r
32 X-Sasl-enc: Cn+/+GEsj/e9VT7Q4VFcgGNgR8sTORiKK/RVJ6N4uEx7 1307428647
\r
33 Received: from smart (cpe-76-175-234-46.socal.res.rr.com [76.175.234.46])
\r
34 by mail.messagingengine.com (Postfix) with ESMTPSA id 8547A442101
\r
35 for <notmuch@notmuchmail.org>; Tue, 7 Jun 2011 02:37:27 -0400 (EDT)
\r
36 Date: Mon, 6 Jun 2011 23:37:37 -0700
\r
37 From: Dima Kogan <notmuch@dima.secretsauce.net>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: Re: [PATCH] added keys to hide/show a portion of the thread
\r
40 Message-ID: <20110606233737.417dbb44@smart>
\r
41 In-Reply-To: <1306659404-21840-1-git-send-email-notmuch@dima.secretsauce.net>
\r
42 References: <1306659404-21840-1-git-send-email-notmuch@dima.secretsauce.net>
\r
43 X-Mailer: Claws Mail 3.7.9 (GTK+ 2.24.4; x86_64-pc-linux-gnu)
\r
45 Content-Type: multipart/mixed; boundary="MP_/5iQ=vw+=WwAqDiDRsB3sSAx"
\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: Tue, 07 Jun 2011 06:37:30 -0000
\r
60 --MP_/5iQ=vw+=WwAqDiDRsB3sSAx
\r
61 Content-Type: text/plain; charset=US-ASCII
\r
62 Content-Transfer-Encoding: 7bit
\r
63 Content-Disposition: inline
\r
65 > On Sun, 29 May 2011 01:56:44 -0700
\r
66 > notmuch@dima.secretsauce.net wrote:
\r
68 > Here's another improvement. In the notmuch-show display this binds
\r
69 > '[' to expand all the children messages (replies). Analogously ']'
\r
70 > collapses all the children messages.
\r
72 Here's an update of the patch to conform with notmuch's indentation style.
\r
74 --MP_/5iQ=vw+=WwAqDiDRsB3sSAx
\r
75 Content-Type: text/x-patch
\r
76 Content-Transfer-Encoding: 7bit
\r
77 Content-Disposition: attachment;
\r
78 filename=0001-added-keys-to-hide-show-a-portion-of-the-thread.patch
\r
80 >From 0e2ef657fe0f6e7f8f2f7e87acd1fbbf58d8d95d Mon Sep 17 00:00:00 2001
\r
81 From: Dima Kogan <dima@secretsauce.net>
\r
82 Date: Sun, 29 May 2011 00:37:55 -0700
\r
83 Subject: [PATCH] added keys to hide/show a portion of the thread
\r
86 emacs/notmuch-show.el | 31 +++++++++++++++++++++++++++++++
\r
87 1 files changed, 31 insertions(+), 0 deletions(-)
\r
89 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
90 index 2ba151e..5ecf5ca 100644
\r
91 --- a/emacs/notmuch-show.el
\r
92 +++ b/emacs/notmuch-show.el
\r
93 @@ -813,6 +813,8 @@ function is used. "
\r
94 (define-key map " " 'notmuch-show-advance-and-archive)
\r
95 (define-key map (kbd "M-RET") 'notmuch-show-open-or-close-all)
\r
96 (define-key map (kbd "RET") 'notmuch-show-toggle-message)
\r
97 + (define-key map "]" 'notmuch-show-hide-hierarchy)
\r
98 + (define-key map "[" 'notmuch-show-show-hierarchy)
\r
100 "Keymap for \"notmuch show\" buffers.")
\r
101 (fset 'notmuch-show-mode-map notmuch-show-mode-map)
\r
102 @@ -1266,6 +1268,35 @@ argument, hide all of the messages."
\r
103 until (not (notmuch-show-goto-message-next))))
\r
104 (force-window-update))
\r
106 +; get the depth, assuming the point is at the start of the header line
\r
107 +(defun notmuch-show-get-depth ()
\r
109 + (let ((start (point)))
\r
110 + (- (re-search-forward "^ *") start))))
\r
112 +(defun notmuch-show-hideshow-hierarchy (doshow)
\r
113 + "Hides or shows this message and all its replies"
\r
116 + (notmuch-show-move-to-message-top)
\r
118 + (let ((depth0 (notmuch-show-get-depth)))
\r
119 + (loop do (notmuch-show-message-visible (notmuch-show-get-message-properties)
\r
121 + until (or (not (notmuch-show-goto-message-next))
\r
122 + (<= (notmuch-show-get-depth) depth0))))
\r
123 + (force-window-update)))
\r
125 +(defun notmuch-show-show-hierarchy ()
\r
126 + "Show this message and all its replies"
\r
128 + (notmuch-show-hideshow-hierarchy 1))
\r
130 +(defun notmuch-show-hide-hierarchy ()
\r
131 + "Hide this message and all its replies"
\r
133 + (notmuch-show-hideshow-hierarchy nil))
\r
135 (defun notmuch-show-next-button ()
\r
136 "Advance point to the next button in the buffer."
\r
142 --MP_/5iQ=vw+=WwAqDiDRsB3sSAx--
\r