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 5EE90431FCB
\r
6 for <notmuch@notmuchmail.org>; Thu, 25 Oct 2012 01:09:45 -0700 (PDT)
\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 4ecANyDJptn5 for <notmuch@notmuchmail.org>;
\r
18 Thu, 25 Oct 2012 01:09:41 -0700 (PDT)
\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 915A7431FD0
\r
23 for <notmuch@notmuchmail.org>; Thu, 25 Oct 2012 01:09:38 -0700 (PDT)
\r
24 Received: by mail-we0-f181.google.com with SMTP id u54so795382wey.26
\r
25 for <notmuch@notmuchmail.org>; Thu, 25 Oct 2012 01:09:37 -0700 (PDT)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
27 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
28 bh=6lcBIomlH/RgR54ShypwviV26OBCdI0GFJeqXtjgkFY=;
\r
29 b=N/T794yrxKIGa+aWQT+cC0g+GoXR5t+aQlQQyR0e0D1RQTXuuWP6PDlZWow4R0E6js
\r
30 iT8JTtv1vIxQTKenMAmARGXUvfbWekmt1jD5Ctchse0sGsJsjRnaglQUdyklHg19NZLh
\r
31 J99EvPXz9HOSuMy5jOPvFitlfBOKUTd+Nd1mnZulgoXC5nTiUoIEoxaiNRV0C1b/5jKT
\r
32 Pj0/oL91vHOSv1Ba9ElyazXNnKGnX9e0cQQd+T9xmpdp5kiO31e5cayGNLFkvKQUFh84
\r
33 +gzPwJWkz9mgu8ZJefqctxBz4o+guB83f9NDdSWk1gpH/kqUNpjvgVMc2fu95cfrc7hS
\r
35 Received: by 10.180.96.164 with SMTP id dt4mr8471427wib.10.1351152576843;
\r
36 Thu, 25 Oct 2012 01:09:36 -0700 (PDT)
\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])
\r
38 by mx.google.com with ESMTPS id gg4sm9893093wib.6.2012.10.25.01.09.35
\r
39 (version=TLSv1/SSLv3 cipher=OTHER);
\r
40 Thu, 25 Oct 2012 01:09:35 -0700 (PDT)
\r
41 From: Mark Walters <markwalters1009@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Subject: [PATCH (draft) 2/2] emacs: show: make "view part" show hidden parts
\r
44 Date: Thu, 25 Oct 2012 09:09:23 +0100
\r
45 Message-Id: <1351152563-27277-3-git-send-email-markwalters1009@gmail.com>
\r
46 X-Mailer: git-send-email 1.7.9.1
\r
47 In-Reply-To: <1351152563-27277-1-git-send-email-markwalters1009@gmail.com>
\r
48 References: <1351152563-27277-1-git-send-email-markwalters1009@gmail.com>
\r
49 X-BeenThere: notmuch@notmuchmail.org
\r
50 X-Mailman-Version: 2.1.13
\r
52 List-Id: "Use and development of the notmuch mail system."
\r
53 <notmuch.notmuchmail.org>
\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
57 List-Post: <mailto:notmuch@notmuchmail.org>
\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
61 X-List-Received-Date: Thu, 25 Oct 2012 08:09:45 -0000
\r
63 This change means that hidden parts in the show buffer are inserted
\r
64 into the buffer when the "view command" is called on that part (by
\r
65 default v on the button).
\r
67 emacs/notmuch-show.el | 8 ++++++--
\r
68 1 files changed, 6 insertions(+), 2 deletions(-)
\r
70 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
71 index 9157669..293456d 100644
\r
72 --- a/emacs/notmuch-show.el
\r
73 +++ b/emacs/notmuch-show.el
\r
74 @@ -836,7 +836,8 @@ has overridden the default for this part"
\r
75 (when (memq nth user-parts)
\r
76 (setq not-shown (not not-shown)))
\r
78 - (notmuch-show-insert-part-header nth content-type content-type nil " (not shown)")
\r
79 + (button-put (notmuch-show-insert-part-header nth content-type content-type nil " (not shown)")
\r
80 + :part-not-shown 't)
\r
81 (notmuch-show-insert-bodypart-internal msg part content-type nth depth content-type)))
\r
82 ;; Some of the body part handlers leave point somewhere up in the
\r
83 ;; part, so we make sure that we're down at the end.
\r
84 @@ -1912,7 +1913,10 @@ the user (see `notmuch-show-stash-mlarchive-link-alist')."
\r
86 (defun notmuch-show-part-button-view (&optional button)
\r
88 - (notmuch-show-part-button-internal button #'notmuch-show-view-part))
\r
89 + (let ((button (or button (button-at (point)))))
\r
90 + (if (and button (button-get button :part-not-shown))
\r
91 + (notmuch-show-part-button-internal button #'notmuch-show-internally-show-part)
\r
92 + (notmuch-show-part-button-internal button #'notmuch-show-view-part))))
\r
94 (defun notmuch-show-part-button-interactively-view (&optional button)
\r