1 Return-Path: <jani@nikula.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 51DBA431FB6
\r
6 for <notmuch@notmuchmail.org>; Fri, 15 Jun 2012 08:55:56 -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=[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 yR89tORVvnzO for <notmuch@notmuchmail.org>;
\r
16 Fri, 15 Jun 2012 08:55:56 -0700 (PDT)
\r
17 Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com
\r
18 [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id B07F3431FAE
\r
21 for <notmuch@notmuchmail.org>; Fri, 15 Jun 2012 08:55:55 -0700 (PDT)
\r
22 Received: by lbbgk8 with SMTP id gk8so3243772lbb.26
\r
23 for <notmuch@notmuchmail.org>; Fri, 15 Jun 2012 08:55:54 -0700 (PDT)
\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
25 d=google.com; s=20120113;
\r
26 h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state;
\r
27 bh=4A6+jH/oUcowNZW+KiSAzggSxrWY3b0TWvTdn13Fo1o=;
\r
28 b=fHuHSYhOQHApO2ek+O97S1ByrjxDj8rwHntv5HrTV7x68XQpyONw/YS0so0lNQoJOo
\r
29 rOwmYtoQs4Mi73ZDjHiHxCR8gj5nfGM6ZIm08AfOW5ddsICodk4mga5kSRbimSk6MC8y
\r
30 vMvgKwHa1/rKZ8OxSQGb1UTJpNuD2OIehxgBU+cQrfF22M4ii68Q/p4H5cIWpmONZVzN
\r
31 S35DhytBOTHjmW/xKra7VwgycJlZNNo15iUX3mXEG1LLw+vumWCyAN4tO5xXT5vngZ1C
\r
32 /caBODQKJir5m2YQq9B/d0oVf1Mo200f54GMDV6HjfdPR8y0EgY9CDBTlxtn3Ye+yEDy
\r
34 Received: by 10.152.108.178 with SMTP id hl18mr6037898lab.11.1339775754203;
\r
35 Fri, 15 Jun 2012 08:55:54 -0700 (PDT)
\r
36 Received: from localhost (dsl-hkibrasgw4-fe50dc00-68.dhcp.inet.fi.
\r
37 [80.220.80.68]) by mx.google.com with ESMTPS id
\r
38 gi19sm12966622lab.16.2012.06.15.08.55.52
\r
39 (version=SSLv3 cipher=OTHER); Fri, 15 Jun 2012 08:55:53 -0700 (PDT)
\r
40 From: Jani Nikula <jani@nikula.org>
\r
41 To: notmuch@notmuchmail.org
\r
42 Subject: [PATCH] emacs: add function to toggle display of all
\r
43 multipart/alternative parts
\r
44 Date: Fri, 15 Jun 2012 18:55:51 +0300
\r
45 Message-Id: <1339775751-18002-1-git-send-email-jani@nikula.org>
\r
46 X-Mailer: git-send-email 1.7.9.5
\r
48 ALoCoQng8+ac74X9b8NhpH8Zg4peLY00fhRpVNLAVFNt7uXiNyBBhfneBoJu3CI/qBDSy+Knqcbi
\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: Fri, 15 Jun 2012 15:55:56 -0000
\r
63 Add function notmuch-show-toggle-multipart-alternative to make
\r
64 notmuch-show-all-multipart/alternative-parts buffer local, toggle its
\r
65 value in the buffer, and redisplay the thread with either all or
\r
66 preferred alternative parts expanded.
\r
68 A small wrinkle is that in order to make the variable survive
\r
69 notmuch-show-refresh-view (which is required for expanding/collapsing
\r
70 the parts, but ends up calling kill-all-local-variables through
\r
71 notmuch-show-mode) it is necessary to give it the permanent-local
\r
74 emacs/notmuch-show.el | 11 +++++++++++
\r
75 1 file changed, 11 insertions(+)
\r
77 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
78 index 36cad93..9c177d9 100644
\r
79 --- a/emacs/notmuch-show.el
\r
80 +++ b/emacs/notmuch-show.el
\r
81 @@ -99,6 +99,17 @@ any given message."
\r
83 :group 'notmuch-show)
\r
85 +(defun notmuch-show-toggle-multipart-alternative ()
\r
86 + "Toggle `notmuch-show-all-multipart/alternative-parts' in the buffer."
\r
88 + (unless (local-variable-p 'notmuch-show-all-multipart/alternative-parts)
\r
89 + (make-local-variable 'notmuch-show-all-multipart/alternative-parts)
\r
90 + ;; Make it permanently local to survive notmuch-show-refresh-view.
\r
91 + (put 'notmuch-show-all-multipart/alternative-parts 'permanent-local t))
\r
92 + (setq notmuch-show-all-multipart/alternative-parts
\r
93 + (not notmuch-show-all-multipart/alternative-parts))
\r
94 + (notmuch-show-refresh-view))
\r
96 (defcustom notmuch-show-indent-messages-width 1
\r
97 "Width of message indentation in threads.
\r