Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 57 / 987ab5337881bb1a070ebf13dbbb63bcaaa0eb
1 Return-Path: <fgeller@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 6CD1F431FD0\r
6         for <notmuch@notmuchmail.org>; Mon, 11 Jul 2011 03:09:27 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.789\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.789 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, T_MIME_NO_TEXT=0.01]\r
14         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 7DQUSIwSMTkL for <notmuch@notmuchmail.org>;\r
18         Mon, 11 Jul 2011 03:09:26 -0700 (PDT)\r
19 Received: from mail-fx0-f46.google.com (mail-fx0-f46.google.com\r
20         [209.85.161.46]) (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 4B75D431FB6\r
23         for <notmuch@notmuchmail.org>; Mon, 11 Jul 2011 03:09:26 -0700 (PDT)\r
24 Received: by fxh19 with SMTP id 19so3802171fxh.19\r
25         for <notmuch@notmuchmail.org>; Mon, 11 Jul 2011 03:09:25 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
27         h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
28         :mime-version:content-type;\r
29         bh=V4d58422UJF6TlU6fkNS6r/s0Kqzdi5fW/G7hHCT6ss=;\r
30         b=kc2YvoCi5m3vRILJQag1RaZ3PEinJ0EHm3YDU1rgSD9pevcAvv8pRqJJoaE3Vbk9C7\r
31         41GiX42gReI9WI9dd/62+0GMFS5vWF8nBJLOtlWGNElHg056ernFrFLTeaW1NAvY1uJH\r
32         i0YRJzZxWEmqlTL7JtK7VAcoEzgGlzCZkpjqw=\r
33 Received: by 10.223.101.204 with SMTP id d12mr3707858fao.89.1310378964857;\r
34         Mon, 11 Jul 2011 03:09:24 -0700 (PDT)\r
35 Received: from localhorst.example.com (brln-4dba66f4.pool.mediaWays.net\r
36         [77.186.102.244])\r
37         by mx.google.com with ESMTPS id u20sm7062410fac.42.2011.07.11.03.09.22\r
38         (version=TLSv1/SSLv3 cipher=OTHER);\r
39         Mon, 11 Jul 2011 03:09:23 -0700 (PDT)\r
40 Received: by localhorst.example.com (Postfix, from userid 501)\r
41         id F0D2C4673891; Mon, 11 Jul 2011 12:09:20 +0200 (CEST)\r
42 From: Felix Geller <fgeller@gmail.com>\r
43 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>, notmuch@notmuchmail.org\r
44 Subject: Re: [PATCH] Emacs: Add variable to toggle message indentation in a\r
45         thread\r
46 In-Reply-To: <877h7p16r7.fsf@gmail.com>\r
47 References: <m2r55xi4yr.fsf@gmail.com> <87mxgl19n3.fsf@gmail.com>\r
48         <m2aaclkw46.fsf@gmail.com> <877h7p16r7.fsf@gmail.com>\r
49 User-Agent: Emacs/23.3.1 (x86_64-apple-darwin10.7.0)\r
50 Date: Mon, 11 Jul 2011 12:09:20 +0200\r
51 Message-ID: <m24o2t163z.fsf@gmail.com>\r
52 MIME-Version: 1.0\r
53 Content-Type: multipart/signed; boundary="=-=-=";\r
54         micalg=pgp-sha1; protocol="application/pgp-signature"\r
55 X-BeenThere: notmuch@notmuchmail.org\r
56 X-Mailman-Version: 2.1.13\r
57 Precedence: list\r
58 List-Id: "Use and development of the notmuch mail system."\r
59         <notmuch.notmuchmail.org>\r
60 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
62 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
63 List-Post: <mailto:notmuch@notmuchmail.org>\r
64 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
65 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
66         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
67 X-List-Received-Date: Mon, 11 Jul 2011 10:09:27 -0000\r
68 \r
69 --=-=-=\r
70 Content-Transfer-Encoding: quoted-printable\r
71 \r
72 On Mon, 11 Jul 2011 13:55:24 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmai=\r
73 l.com> wrote:\r
74 > On Mon, 11 Jul 2011 11:24:57 +0200, Felix Geller <fgeller@gmail.com> wrot=\r
75 e:\r
76 > > Hi Dmitry,\r
77 > >=20\r
78 > > thank you for the comments. I included an updated patch that also\r
79 > > includes Daniel's comment regarding the default value.=20\r
80 > >=20\r
81 >=20\r
82 > Another thing that would be nice to have is a test for this feature.\r
83 \r
84 I'll look into it :)\r
85 \r
86 Cheers,\r
87 Felix\r
88 \r
89 >\r
90 >=20\r
91 > Regards,\r
92 >   Dmitry\r
93 >=20\r
94 > > I didn't change the "when" though--not because of personal reasons\r
95 > > ;)--but because it is used for determining indentation of multi-parts.\r
96 > >=20\r
97 > >=20\r
98 > > Cheers,\r
99 > > Felix\r
100 > >=20\r
101 > >=20\r
102 > >=20\r
103 > > On Mon, 11 Jul 2011 12:53:04 +0400, Dmitry Kurochkin <dmitry.kurochkin@=\r
104 gmail.com> wrote:\r
105 > > > Hi Felix.\r
106 > > >=20\r
107 > > > On Mon, 11 Jul 2011 10:42:04 +0200, Felix Geller <fgeller@gmail.com> =\r
108 wrote:\r
109 > > > > Hi,\r
110 > > > >=20\r
111 > > > > I added a variable to toggle message indentation in Emacs.\r
112 > > > >=20\r
113 > > > > Please let me know what you think.\r
114 > > > >=20\r
115 > > >=20\r
116 > > > I like the change.  Though I do not think I would use it without\r
117 > > > chronological sorting.\r
118 > > >=20\r
119 > > > Comments on the code below.\r
120 > > >=20\r
121 > > > Regards,\r
122 > > >   Dmitry\r
123 > > >=20\r
124 > > > >=20\r
125 > > > > Cheers,\r
126 > > > > Felix\r
127 > > > >=20\r
128 > > > >=20\r
129 > > > > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
130 > > > > index a433dec..8101c27 100644\r
131 > > > > --- a/emacs/notmuch-show.el\r
132 > > > > +++ b/emacs/notmuch-show.el\r
133 > > > > @@ -90,6 +90,11 @@ any given message."\r
134 > > > >    :group 'notmuch\r
135 > > > >    :type 'boolean)\r
136 > > > >=20=20\r
137 > > > > +(defcustom notmuch-show-indent-messages-in-thread nil\r
138 > > > > +  "Should the messages in a thread be indented according to their =\r
139 respective depth in the thread?"\r
140 > > >=20\r
141 > > > This line is too long and should be split.\r
142 > > >=20\r
143 > > > > +  :group 'notmuch\r
144 > > > > +  :type 'boolean)\r
145 > > > > +\r
146 > > > >  (defcustom notmuch-show-indent-multipart nil\r
147 > > > >    "Should the sub-parts of a multipart/* part be indented?"\r
148 > > > >    ;; dme: Not sure which is a good default.\r
149 > > > > @@ -237,7 +242,9 @@ unchanged ADDRESS if parsing fails."\r
150 > > > >    "Insert a notmuch style headerline based on HEADERS for a\r
151 > > > >  message at DEPTH in the current thread."\r
152 > > > >    (let ((start (point)))\r
153 > > > > -    (insert (notmuch-show-spaces-n depth)\r
154 > > > > +    (insert (if notmuch-show-indent-messages-in-thread\r
155 > > > > +               (notmuch-show-spaces-n depth)\r
156 > > > > +             "")\r
157 > > >=20\r
158 > > > (if notmuch-show-indent-messages-in-thread\r
159 > > >     (insert (notmuch-show-spaces-n depth)))\r
160 > > >=20\r
161 > > > Is cleaner and avoids useless empty string insert.\r
162 > > >=20\r
163 > > > >             (notmuch-show-clean-address (plist-get headers :From))\r
164 > > > >             " ("\r
165 > > > >             date\r
166 > > > > @@ -733,7 +740,8 @@ current buffer, if possible."\r
167 > > > >      (setq content-end (point-marker))\r
168 > > > >=20=20\r
169 > > > >      ;; Indent according to the depth in the thread.\r
170 > > > > -    (indent-rigidly content-start content-end depth)\r
171 > > > > +    (when notmuch-show-indent-messages-in-thread\r
172 > > > > +      (indent-rigidly content-start content-end depth))\r
173 > > >=20\r
174 > > > Not a big deal, but I would prefer `if' instead of `when' here.\r
175 > > >=20\r
176 > > > Regards,\r
177 > > >   Dmitry\r
178 > > >=20\r
179 > > > >=20=20\r
180 > > > >      (setq message-end (point-max-marker))\r
181 > > > >=20=20\r
182 > > > > _______________________________________________\r
183 > > > > notmuch mailing list\r
184 > > > > notmuch@notmuchmail.org\r
185 > > > > http://notmuchmail.org/mailman/listinfo/notmuch\r
186 > >=20\r
187 > >=20\r
188 > > commit f90fafdc0545a825ea4b69db5e51c2e866a4ff5e\r
189 > > Author: Felix Geller <fgeller@gmail.com>\r
190 > > Date:   Mon Jul 11 10:39:00 2011 +0200\r
191 > >=20\r
192 > >     Added a variable to toggle message indentation for thread view in e=\r
193 macs.\r
194 > >      - includes adjustments according to comments from ML\r
195 > >=20\r
196 > > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
197 > > index a433dec..1834066 100644\r
198 > > --- a/emacs/notmuch-show.el\r
199 > > +++ b/emacs/notmuch-show.el\r
200 > > @@ -90,6 +90,11 @@ any given message."\r
201 > >    :group 'notmuch\r
202 > >    :type 'boolean)\r
203 > >=20=20\r
204 > > +(defcustom notmuch-show-indent-messages-in-thread t\r
205 > > +  "Should messages be indented according to their depth in a thread?"\r
206 > > +  :group 'notmuch\r
207 > > +  :type 'boolean)\r
208 > > +\r
209 > >  (defcustom notmuch-show-indent-multipart nil\r
210 > >    "Should the sub-parts of a multipart/* part be indented?"\r
211 > >    ;; dme: Not sure which is a good default.\r
212 > > @@ -237,8 +242,9 @@ unchanged ADDRESS if parsing fails."\r
213 > >    "Insert a notmuch style headerline based on HEADERS for a\r
214 > >  message at DEPTH in the current thread."\r
215 > >    (let ((start (point)))\r
216 > > -    (insert (notmuch-show-spaces-n depth)\r
217 > > -       (notmuch-show-clean-address (plist-get headers :From))\r
218 > > +    (when notmuch-show-indent-messages-in-thread\r
219 > > +      (insert (notmuch-show-spaces-n depth)))\r
220 > > +    (insert (notmuch-show-clean-address (plist-get headers :From))\r
221 > >         " ("\r
222 > >         date\r
223 > >         ") ("\r
224 > > @@ -733,7 +739,8 @@ current buffer, if possible."\r
225 > >      (setq content-end (point-marker))\r
226 > >=20=20\r
227 > >      ;; Indent according to the depth in the thread.\r
228 > > -    (indent-rigidly content-start content-end depth)\r
229 > > +    (when notmuch-show-indent-messages-in-thread\r
230 > > +      (indent-rigidly content-start content-end depth))\r
231 > >=20=20\r
232 > >      (setq message-end (point-max-marker))\r
233 > >=20=20\r
234 \r
235 --=-=-=\r
236 Content-Type: application/pgp-signature\r
237 \r
238 -----BEGIN PGP SIGNATURE-----\r
239 Version: GnuPG/MacGPG2 v2.0.17 (Darwin)\r
240 \r
241 iEYEARECAAYFAk4ay9AACgkQMxgKfMb9y5bacwCfbqEHGWRX8eEOCZ/vlqi7itOM\r
242 uYcAoIih8mtDn3j+6c+gB+hQmPbtuqhj\r
243 =96xt\r
244 -----END PGP SIGNATURE-----\r
245 --=-=-=--\r