Re: [feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / 82 / d1dd9900f9709444ea2fe82b735b9ce9f559ba
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 8FD01429E26\r
6         for <notmuch@notmuchmail.org>; Wed,  8 Feb 2012 08:55:28 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
9 X-Spam-Flag: NO\r
10 X-Spam-Score: -0.7\r
11 X-Spam-Level: \r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
13         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\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 Nc7yQ7PNgeOm for <notmuch@notmuchmail.org>;\r
17         Wed,  8 Feb 2012 08:55:24 -0800 (PST)\r
18 Received: from mail-qw0-f46.google.com (mail-qw0-f46.google.com\r
19         [209.85.216.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 56C84431FAF\r
22         for <notmuch@notmuchmail.org>; Wed,  8 Feb 2012 08:55:24 -0800 (PST)\r
23 Received: by qadc10 with SMTP id c10so4265234qad.5\r
24         for <notmuch@notmuchmail.org>; Wed, 08 Feb 2012 08:55:23 -0800 (PST)\r
25 Received: by 10.224.195.133 with SMTP id ec5mr28068542qab.7.1328720123680;\r
26         Wed, 08 Feb 2012 08:55:23 -0800 (PST)\r
27 Received: from localhost (nikula.org. [92.243.24.172])\r
28         by mx.google.com with ESMTPS id g9sm3869610qad.16.2012.02.08.08.55.21\r
29         (version=SSLv3 cipher=OTHER); Wed, 08 Feb 2012 08:55:22 -0800 (PST)\r
30 From: Jani Nikula <jani@nikula.org>\r
31 To: notmuch@notmuchmail.org\r
32 Subject: [PATCH 1/2] emacs: support defining a list of alternative parts to\r
33         show\r
34 Date: Wed,  8 Feb 2012 16:55:15 +0000\r
35 Message-Id:\r
36  <fe86d0e2cf0d236615613fa16d94c94fb2120729.1328719309.git.jani@nikula.org>\r
37 X-Mailer: git-send-email 1.7.1\r
38 In-Reply-To: <cover.1328719309.git.jani@nikula.org>\r
39 References: <cover.1328719309.git.jani@nikula.org>\r
40 In-Reply-To: <cover.1328719309.git.jani@nikula.org>\r
41 References: <cover.1328719309.git.jani@nikula.org>\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46         <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Wed, 08 Feb 2012 16:55:28 -0000\r
55 \r
56 Make notmuch-show-all-multipart/alternative-parts accept a list of\r
57 multipart/alternative types to show in addition to the preferred\r
58 types. This allows the user to force display some alternative part\r
59 types while normally showing just the preferred ones.\r
60 \r
61 Signed-off-by: Jani Nikula <jani@nikula.org>\r
62 ---\r
63  emacs/notmuch-show.el |    8 ++++++--\r
64  1 files changed, 6 insertions(+), 2 deletions(-)\r
65 \r
66 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
67 index faa9f9b..1340380 100644\r
68 --- a/emacs/notmuch-show.el\r
69 +++ b/emacs/notmuch-show.el\r
70 @@ -97,7 +97,9 @@ any given message."\r
71  ;; Mostly useful for debugging.\r
72  (defcustom notmuch-show-all-multipart/alternative-parts t\r
73    "Should all parts of multipart/alternative parts be shown?"\r
74 -  :type 'boolean\r
75 +  :type '(choice (const :tag "Show all" t)\r
76 +                (const :tag "Show preferred" nil)\r
77 +                (repeat :tag "Show preferred and custom" string))\r
78    :group 'notmuch-show)\r
79  \r
80  (defcustom notmuch-show-indent-messages-width 1\r
81 @@ -513,7 +515,9 @@ current buffer, if possible."\r
82      ;; should be chosen if there are more than one that match?\r
83      (mapc (lambda (inner-part)\r
84             (let ((inner-type (plist-get inner-part :content-type)))\r
85 -             (if (or notmuch-show-all-multipart/alternative-parts\r
86 +             (if (or (equal notmuch-show-all-multipart/alternative-parts t)\r
87 +                     (member inner-type\r
88 +                             notmuch-show-all-multipart/alternative-parts)\r
89                       (string= chosen-type inner-type))\r
90                   (notmuch-show-insert-bodypart msg inner-part depth)\r
91                 (notmuch-show-insert-part-header (plist-get inner-part :id) inner-type inner-type nil " (not shown)"))))\r
92 -- \r
93 1.7.1\r
94 \r