Re: [PATCH] Emacs: Add variable to toggle message indentation in a thread
authorJameson Graef Rollins <jrollins@finestructure.net>
Mon, 11 Jul 2011 16:32:45 +0000 (09:32 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:39:04 +0000 (09:39 -0800)
0b/3ca22ef6c38ec8d179afb3c4011005b4b576c9 [new file with mode: 0644]

diff --git a/0b/3ca22ef6c38ec8d179afb3c4011005b4b576c9 b/0b/3ca22ef6c38ec8d179afb3c4011005b4b576c9
new file mode 100644 (file)
index 0000000..bd539eb
--- /dev/null
@@ -0,0 +1,123 @@
+Return-Path: <jrollins@finestructure.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 1BC19431FD0\r
+       for <notmuch@notmuchmail.org>; Mon, 11 Jul 2011 09:32:53 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.29\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id ecW-ZK5Si7tt for <notmuch@notmuchmail.org>;\r
+       Mon, 11 Jul 2011 09:32:51 -0700 (PDT)\r
+Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
+       [131.215.239.19])\r
+       by olra.theworths.org (Postfix) with ESMTP id 5AE27431FB6\r
+       for <notmuch@notmuchmail.org>; Mon, 11 Jul 2011 09:32:51 -0700 (PDT)\r
+Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
+       by earth-doxen-postvirus (Postfix) with ESMTP id 35B0966E0149;\r
+       Mon, 11 Jul 2011 09:32:49 -0700 (PDT)\r
+X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new\r
+Received: from servo.finestructure.net (cpe-98-149-172-122.socal.res.rr.com\r
+       [98.149.172.122]) (Authenticated sender: jrollins)\r
+       by earth-doxen-submit (Postfix) with ESMTP id 2446366E0348;\r
+       Mon, 11 Jul 2011 09:32:46 -0700 (PDT)\r
+Received: by servo.finestructure.net (Postfix, from userid 1000)\r
+       id BD8A2244; Mon, 11 Jul 2011 09:32:47 -0700 (PDT)\r
+From: Jameson Graef Rollins <jrollins@finestructure.net>\r
+To: Felix Geller <fgeller@gmail.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] Emacs: Add variable to toggle message indentation in a\r
+       thread\r
+In-Reply-To: <m2r55xi4yr.fsf@gmail.com>\r
+References: <m2r55xi4yr.fsf@gmail.com>\r
+User-Agent: Notmuch/0.5-353-gb44d56e (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Mon, 11 Jul 2011 09:32:45 -0700\r
+Message-ID: <87aackwzf6.fsf@servo.factory.finestructure.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha256; protocol="application/pgp-signature"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 11 Jul 2011 16:32:53 -0000\r
+\r
+--=-=-=\r
+\r
+On Mon, 11 Jul 2011 10:42:04 +0200, Felix Geller <fgeller@gmail.com> wrote:\r
+> I added a variable to toggle message indentation in Emacs.\r
+\r
+Hi, Felix.  Thanks for submitting this patch.  I think it's a good idea.\r
+I have a couple of comments below, a couple of which echo what Dmitry\r
+has already pointed out.\r
+\r
+> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+\r
+This patch doesn't include a commit log, which is something we generally\r
+require.  The preferred way to send patches is with git format-patch or\r
+send-email, both of which format patches in such a way that they can be\r
+immediately applied to a git repo, including with the commit log.\r
+\r
+> +(defcustom notmuch-show-indent-messages-in-thread nil\r
+> +  "Should the messages in a thread be indented according to their respective depth in the thread?"\r
+> +  :group 'notmuch\r
+> +  :type 'boolean)\r
+\r
+I agres with Dmitry that this should default to 't', to be consistent\r
+with the current default behavior.\r
+\r
+> -    (insert (notmuch-show-spaces-n depth)\r
+> +    (insert (if notmuch-show-indent-messages-in-thread\r
+> +            (notmuch-show-spaces-n depth)\r
+> +          "")\r
+\r
+I also agree with Dmitry's suggestion here to use the following slightly\r
+simpler construct:\r
+\r
+ (if notmuch-show-indent-messages-in-thread\r
+     (insert (notmuch-show-spaces-n depth)))\r
+\r
+Finally, as Dmitry also points out, you'll almost certainly need to\r
+construct a test for this feature, since it constitutes a pretty big\r
+formatting change.  It should probably test for both cases of the\r
+customization variable.  Check out the tests in tests/emacs for\r
+guidance.\r
+\r
+hth.\r
+\r
+jamie.\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+\r
+iQIcBAEBCAAGBQJOGyWtAAoJEO00zqvie6q8oWgP/0EThDHhwlBdBeDQSY2jzILY\r
+GKUXROMAv20qQFjgzho3rDznz09OpVKPPTbpZuqbF3PuLMhwwDCWbOYEddZm+3ph\r
+r3P+L7Xi6esx2TrUrTL7pgrGYGlMX3xrLZLjc2E7a+GY9UO1NODliiXCff93G311\r
+1kzDZhPV6s8MjvvsIvD9aH4bbjV3iz+7fkMMcZV1qHXUQskik/TLETUKuJx1bmRz\r
+fMrX7fssALCpCNIZFgPdkrhOvU4DUes5AjukWWompE6AwRSdDE9WV5O5P8xSWCb4\r
+M4Ptgo8kMEj2IHNvcf1MJtvZgybt2+oX82CxFLQnBvVGj3H/HqXK+ZrTMW8UlwTu\r
+5Q2LYELNSv1CilNXye43f/b93dlYLmUwM9RO11i1Gd1e97Nu2Taz7SDD3/M/NAx4\r
++IcumUgDSvx/u+4QDggE9th0ftQ1+KLaoCjukEbl1VYzn6orisJ4GamnmveuRpjK\r
+B4uV9KheIVbRABN/ExxiTRQLp0aHEsNIdeHTQu2p8E+APiyqey3NkDJeKoRk6xqy\r
+MCEpDy1ReRu74BkfBjAe0UNyvJZmhDk4ni/vGJ/r5Mt8cMYd6iMQpRp4EgguBCdg\r
+SpP7HamxSkMpn/WToIv0/o5EVOoRIL10J6WK1Q+ZGTK0tsCgqZqgrCro8eWeJEfs\r
+ujSVxTYHWHmzvd+tcJRe\r
+=KHj4\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r