[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / 8a / 4f4f59c3f68b07ae5e7196b0ef5e2c93b90bfe
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 98542431FAF\r
6         for <notmuch@notmuchmail.org>; Thu,  9 Feb 2012 06:46:10 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \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 JrZWDA8562uj for <notmuch@notmuchmail.org>;\r
16         Thu,  9 Feb 2012 06:46:10 -0800 (PST)\r
17 Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com\r
18         [209.85.216.53]) (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 E23D7431FAE\r
21         for <notmuch@notmuchmail.org>; Thu,  9 Feb 2012 06:46:09 -0800 (PST)\r
22 Received: by qafk1 with SMTP id k1so1308748qaf.5\r
23         for <notmuch@notmuchmail.org>; Thu, 09 Feb 2012 06:46:08 -0800 (PST)\r
24 MIME-Version: 1.0\r
25 Received: by 10.229.136.200 with SMTP id s8mr1455121qct.9.1328798768080;\r
26         Thu, 09 Feb 2012 06:46:08 -0800 (PST)\r
27 Received: from localhost (nikula.org. [92.243.24.172])\r
28         by mx.google.com with ESMTPS id dm7sm6160912qab.5.2012.02.09.06.46.05\r
29         (version=SSLv3 cipher=OTHER); Thu, 09 Feb 2012 06:46:06 -0800 (PST)\r
30 From: Jani Nikula <jani@nikula.org>\r
31 To: notmuch@notmuchmail.org\r
32 Subject: [PATCH v2 1/2] emacs: support defining a list of alternative parts to\r
33         show\r
34 Date: Thu,  9 Feb 2012 14:46:02 +0000\r
35 Message-Id:\r
36  <ab777cf0fa83778d3399ac52094df9230738819d.1328798471.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 X-Gm-Message-State:\r
41  ALoCoQk/v3rAlyab6jCzU03FNmqoOYXKf88jelYaFB/Rt1AZLGY9wi1YuiRJezlHbgYBJH4M2/cd\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: Thu, 09 Feb 2012 14:46:10 -0000\r
55 \r
56 Make notmuch-show-all-multipart/alternative-parts accept a list of\r
57 regexps to match the part types to determine which parts to show in\r
58 addition to the preferred types. This allows the user to force display\r
59 some alternative part types while normally showing just the preferred\r
60 ones.\r
61 \r
62 Signed-off-by: Jani Nikula <jani@nikula.org>\r
63 ---\r
64  emacs/notmuch-show.el |   23 ++++++++++++++++++-----\r
65  1 files changed, 18 insertions(+), 5 deletions(-)\r
66 \r
67 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
68 index 24fde05..5f643f1 100644\r
69 --- a/emacs/notmuch-show.el\r
70 +++ b/emacs/notmuch-show.el\r
71 @@ -94,10 +94,20 @@ any given message."\r
72    :group 'notmuch-show\r
73    :group 'notmuch-hooks)\r
74  \r
75 -;; Mostly useful for debugging.\r
76  (defcustom notmuch-show-all-multipart/alternative-parts t\r
77 -  "Should all parts of multipart/alternative parts be shown?"\r
78 -  :type 'boolean\r
79 +  "Which parts of multipart/alternative should be shown?\r
80 +\r
81 +This variable determines which parts of multipart/alternative\r
82 +should be displayed. Set to t (the default) to show all\r
83 +parts. Set to nil to only show the preferred parts. Set to a list\r
84 +of regexps to display the preferred parts, and parts matching any\r
85 +of the regexps, for example:\r
86 +\r
87 + (setq notmuch-show-all-multipart/alternative-parts\r
88 +      '(\"text/.*calendar\" \"text/html\"))"\r
89 +  :type '(choice (const :tag "Show all parts" t)\r
90 +                (const :tag "Show preferred parts" nil)\r
91 +                (repeat :tag "Show preferred and parts matching regexps" string))\r
92    :group 'notmuch-show)\r
93  \r
94  (defcustom notmuch-show-indent-messages-width 1\r
95 @@ -513,8 +523,11 @@ current buffer, if possible."\r
96      ;; should be chosen if there are more than one that match?\r
97      (mapc (lambda (inner-part)\r
98             (let ((inner-type (plist-get inner-part :content-type)))\r
99 -             (if (or notmuch-show-all-multipart/alternative-parts\r
100 -                     (string= chosen-type inner-type))\r
101 +             (if (or (equal notmuch-show-all-multipart/alternative-parts t)\r
102 +                     (string= chosen-type inner-type)\r
103 +                     (and\r
104 +                      notmuch-show-all-multipart/alternative-parts\r
105 +                      (equal (string-match-p (mapconcat (lambda (s) (format "^%s$" s)) notmuch-show-all-multipart/alternative-parts "\\|") inner-type) 0)))\r
106                   (notmuch-show-insert-bodypart msg inner-part depth)\r
107                 (notmuch-show-insert-part-header (plist-get inner-part :id) inner-type inner-type nil " (not shown)"))))\r
108           inner-parts)\r
109 -- \r
110 1.7.1\r
111 \r