Re: [PATCH] test: test folder renames
[notmuch-archives.git] / c2 / da5cb0de385a7711b5f5b7ebf530d0087c460e
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 9E8C9431FAF\r
6         for <notmuch@notmuchmail.org>; Mon, 20 Feb 2012 23:50:17 -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 NqrmZfdhu+wO for <notmuch@notmuchmail.org>;\r
16         Mon, 20 Feb 2012 23:50:16 -0800 (PST)\r
17 Received: from mail-qw0-f46.google.com (mail-qw0-f46.google.com\r
18         [209.85.216.46]) (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 D5FCA431FAE\r
21         for <notmuch@notmuchmail.org>; Mon, 20 Feb 2012 23:50:16 -0800 (PST)\r
22 Received: by qadc10 with SMTP id c10so4570797qad.5\r
23         for <notmuch@notmuchmail.org>; Mon, 20 Feb 2012 23:50:15 -0800 (PST)\r
24 Received-SPF: pass (google.com: domain of jani@nikula.org designates\r
25         10.229.136.144 as permitted sender) client-ip=10.229.136.144; \r
26 Authentication-Results: mr.google.com;\r
27         spf=pass (google.com: domain of jani@nikula.org\r
28         designates 10.229.136.144 as permitted sender)\r
29         smtp.mail=jani@nikula.org\r
30 Received: from mr.google.com ([10.229.136.144])\r
31         by 10.229.136.144 with SMTP id r16mr18499281qct.62.1329810615299\r
32         (num_hops = 1); Mon, 20 Feb 2012 23:50:15 -0800 (PST)\r
33 Received: by 10.229.136.144 with SMTP id r16mr15593502qct.62.1329810615157;\r
34         Mon, 20 Feb 2012 23:50:15 -0800 (PST)\r
35 Received: from localhost (nikula.org. [92.243.24.172])\r
36         by mx.google.com with ESMTPS id hp1sm6771287qab.22.2012.02.20.23.50.13\r
37         (version=SSLv3 cipher=OTHER); Mon, 20 Feb 2012 23:50:14 -0800 (PST)\r
38 From: Jani Nikula <jani@nikula.org>\r
39 To: notmuch@notmuchmail.org\r
40 Subject: Re: [PATCH v2 1/2] emacs: support defining a list of alternative\r
41         parts to show\r
42 In-Reply-To:\r
43  <ab777cf0fa83778d3399ac52094df9230738819d.1328798471.git.jani@nikula.org>\r
44 References: <cover.1328719309.git.jani@nikula.org>\r
45         <ab777cf0fa83778d3399ac52094df9230738819d.1328798471.git.jani@nikula.org>\r
46 User-Agent: Notmuch/0.11.1+168~g25a7ceb (http://notmuchmail.org) Emacs/23.1.1\r
47         (i686-pc-linux-gnu)\r
48 Date: Tue, 21 Feb 2012 07:50:11 +0000\r
49 Message-ID: <87obssiq18.fsf@nikula.org>\r
50 MIME-Version: 1.0\r
51 Content-Type: text/plain; charset=us-ascii\r
52 X-Gm-Message-State:\r
53  ALoCoQmH41EQSC7KaHI6o1t1HpFsjHLflYRGPKyU1RjOgQRT9HW67lyi3+K7k7egDo6zVCDpcsJf\r
54 X-BeenThere: notmuch@notmuchmail.org\r
55 X-Mailman-Version: 2.1.13\r
56 Precedence: list\r
57 List-Id: "Use and development of the notmuch mail system."\r
58         <notmuch.notmuchmail.org>\r
59 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
61 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
62 List-Post: <mailto:notmuch@notmuchmail.org>\r
63 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
64 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
65         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
66 X-List-Received-Date: Tue, 21 Feb 2012 07:50:17 -0000\r
67 \r
68 On Thu,  9 Feb 2012 14:46:02 +0000, Jani Nikula <jani@nikula.org> wrote:\r
69 > Make notmuch-show-all-multipart/alternative-parts accept a list of\r
70 > regexps to match the part types to determine which parts to show in\r
71 > addition to the preferred types. This allows the user to force display\r
72 > some alternative part types while normally showing just the preferred\r
73 > ones.\r
74 \r
75 Wah, this patch (1/2) is crap, as it also seems to affect the\r
76 reply. I'll probably return to this later, after the json reply stuff is\r
77 merged or so.\r
78 \r
79 BR,\r
80 Jani.\r
81 \r
82 \r
83\r
84 > Signed-off-by: Jani Nikula <jani@nikula.org>\r
85 > ---\r
86 >  emacs/notmuch-show.el |   23 ++++++++++++++++++-----\r
87 >  1 files changed, 18 insertions(+), 5 deletions(-)\r
88\r
89 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
90 > index 24fde05..5f643f1 100644\r
91 > --- a/emacs/notmuch-show.el\r
92 > +++ b/emacs/notmuch-show.el\r
93 > @@ -94,10 +94,20 @@ any given message."\r
94 >    :group 'notmuch-show\r
95 >    :group 'notmuch-hooks)\r
96 >  \r
97 > -;; Mostly useful for debugging.\r
98 >  (defcustom notmuch-show-all-multipart/alternative-parts t\r
99 > -  "Should all parts of multipart/alternative parts be shown?"\r
100 > -  :type 'boolean\r
101 > +  "Which parts of multipart/alternative should be shown?\r
102 > +\r
103 > +This variable determines which parts of multipart/alternative\r
104 > +should be displayed. Set to t (the default) to show all\r
105 > +parts. Set to nil to only show the preferred parts. Set to a list\r
106 > +of regexps to display the preferred parts, and parts matching any\r
107 > +of the regexps, for example:\r
108 > +\r
109 > + (setq notmuch-show-all-multipart/alternative-parts\r
110 > +      '(\"text/.*calendar\" \"text/html\"))"\r
111 > +  :type '(choice (const :tag "Show all parts" t)\r
112 > +              (const :tag "Show preferred parts" nil)\r
113 > +              (repeat :tag "Show preferred and parts matching regexps" string))\r
114 >    :group 'notmuch-show)\r
115 >  \r
116 >  (defcustom notmuch-show-indent-messages-width 1\r
117 > @@ -513,8 +523,11 @@ current buffer, if possible."\r
118 >      ;; should be chosen if there are more than one that match?\r
119 >      (mapc (lambda (inner-part)\r
120 >           (let ((inner-type (plist-get inner-part :content-type)))\r
121 > -           (if (or notmuch-show-all-multipart/alternative-parts\r
122 > -                   (string= chosen-type inner-type))\r
123 > +           (if (or (equal notmuch-show-all-multipart/alternative-parts t)\r
124 > +                   (string= chosen-type inner-type)\r
125 > +                   (and\r
126 > +                    notmuch-show-all-multipart/alternative-parts\r
127 > +                    (equal (string-match-p (mapconcat (lambda (s) (format "^%s$" s)) notmuch-show-all-multipart/alternative-parts "\\|") inner-type) 0)))\r
128 >                 (notmuch-show-insert-bodypart msg inner-part depth)\r
129 >               (notmuch-show-insert-part-header (plist-get inner-part :id) inner-type inner-type nil " (not shown)"))))\r
130 >         inner-parts)\r
131 > -- \r
132 > 1.7.1\r
133\r