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
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
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
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
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
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
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
70 Content-Transfer-Encoding: quoted-printable
\r
72 On Mon, 11 Jul 2011 13:55:24 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmai=
\r
74 > On Mon, 11 Jul 2011 11:24:57 +0200, Felix Geller <fgeller@gmail.com> wrot=
\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
82 > Another thing that would be nice to have is a test for this feature.
\r
84 I'll look into it :)
\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
103 > > On Mon, 11 Jul 2011 12:53:04 +0400, Dmitry Kurochkin <dmitry.kurochkin@=
\r
107 > > > On Mon, 11 Jul 2011 10:42:04 +0200, Felix Geller <fgeller@gmail.com> =
\r
111 > > > > I added a variable to toggle message indentation in Emacs.
\r
113 > > > > Please let me know what you think.
\r
116 > > > I like the change. Though I do not think I would use it without
\r
117 > > > chronological sorting.
\r
119 > > > Comments on the code below.
\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
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
141 > > > This line is too long and should be split.
\r
143 > > > > + :group 'notmuch
\r
144 > > > > + :type 'boolean)
\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
158 > > > (if notmuch-show-indent-messages-in-thread
\r
159 > > > (insert (notmuch-show-spaces-n depth)))
\r
161 > > > Is cleaner and avoids useless empty string insert.
\r
163 > > > > (notmuch-show-clean-address (plist-get headers :From))
\r
166 > > > > @@ -733,7 +740,8 @@ current buffer, if possible."
\r
167 > > > > (setq content-end (point-marker))
\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
174 > > > Not a big deal, but I would prefer `if' instead of `when' here.
\r
180 > > > > (setq message-end (point-max-marker))
\r
182 > > > > _______________________________________________
\r
183 > > > > notmuch mailing list
\r
184 > > > > notmuch@notmuchmail.org
\r
185 > > > > http://notmuchmail.org/mailman/listinfo/notmuch
\r
188 > > commit f90fafdc0545a825ea4b69db5e51c2e866a4ff5e
\r
189 > > Author: Felix Geller <fgeller@gmail.com>
\r
190 > > Date: Mon Jul 11 10:39:00 2011 +0200
\r
192 > > Added a variable to toggle message indentation for thread view in e=
\r
194 > > - includes adjustments according to comments from ML
\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
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
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
224 > > @@ -733,7 +739,8 @@ current buffer, if possible."
\r
225 > > (setq content-end (point-marker))
\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
232 > > (setq message-end (point-max-marker))
\r
236 Content-Type: application/pgp-signature
\r
238 -----BEGIN PGP SIGNATURE-----
\r
239 Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
\r
241 iEYEARECAAYFAk4ay9AACgkQMxgKfMb9y5bacwCfbqEHGWRX8eEOCZ/vlqi7itOM
\r
242 uYcAoIih8mtDn3j+6c+gB+hQmPbtuqhj
\r
244 -----END PGP SIGNATURE-----
\r