[PATCH 2/2] Emacs: Add variable to toggle thread indentation to notmuch-show
authorFelix Geller <fgeller@gmail.com>
Mon, 18 Jul 2011 22:28:39 +0000 (00:28 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:39:10 +0000 (09:39 -0800)
99/c3bcc8329446ff1b6dc0cf68a2b62c434469fb [new file with mode: 0644]

diff --git a/99/c3bcc8329446ff1b6dc0cf68a2b62c434469fb b/99/c3bcc8329446ff1b6dc0cf68a2b62c434469fb
new file mode 100644 (file)
index 0000000..98cdc7d
--- /dev/null
@@ -0,0 +1,111 @@
+Return-Path: <fgeller@gmail.com>\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 E84DC429E3A\r
+       for <notmuch@notmuchmail.org>; Mon, 18 Jul 2011 15:29:24 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 C7zdTuubi8pA for <notmuch@notmuchmail.org>;\r
+       Mon, 18 Jul 2011 15:29:23 -0700 (PDT)\r
+Received: from mail-fx0-f46.google.com (mail-fx0-f46.google.com\r
+       [209.85.161.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 2DD11429E31\r
+       for <notmuch@notmuchmail.org>; Mon, 18 Jul 2011 15:29:19 -0700 (PDT)\r
+Received: by mail-fx0-f46.google.com with SMTP id 19so7015353fxh.19\r
+       for <notmuch@notmuchmail.org>; Mon, 18 Jul 2011 15:29:18 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       bh=Y+5nlOl15aDsBpanxt8Q4Iuj07ALOAnua/EeQUKyfuA=;\r
+       b=k2Q8kyiN2mlfw7iBn7kogpzfHHq/4+IiIonjcJKC955g4ElAQxFkEFXsB4i0TPPVWh\r
+       SyJ5cpq/g21JZ2GQJNnxUsKtKDJmvy5GsebMSnM+UTG5uDmciBkF9W52eXGCNBmxdfuC\r
+       T1uNMWd6Tkzh7MgBd0wP0rzcDR0pFjnO+ke60=\r
+Received: by 10.223.127.195 with SMTP id h3mr10753431fas.135.1311028158857;\r
+       Mon, 18 Jul 2011 15:29:18 -0700 (PDT)\r
+Received: from localhorst.example.com (brln-4d0cb676.pool.mediaWays.net\r
+       [77.12.182.118])\r
+       by mx.google.com with ESMTPS id h20sm14243fai.44.2011.07.18.15.29.17\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Mon, 18 Jul 2011 15:29:18 -0700 (PDT)\r
+Received: by localhorst.example.com (Postfix, from userid 501)\r
+       id E1F174720604; Tue, 19 Jul 2011 00:29:16 +0200 (CEST)\r
+From: Felix Geller <fgeller@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/2] Emacs: Add variable to toggle thread indentation to\r
+       notmuch-show\r
+Date: Tue, 19 Jul 2011 00:28:39 +0200\r
+Message-Id: <1311028119-50637-3-git-send-email-fgeller@gmail.com>\r
+X-Mailer: git-send-email 1.7.6\r
+In-Reply-To: <1311028119-50637-1-git-send-email-fgeller@gmail.com>\r
+References: <87vcuz2yga.fsf@servo.factory.finestructure.net>\r
+       <1311028119-50637-1-git-send-email-fgeller@gmail.com>\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, 18 Jul 2011 22:29:25 -0000\r
+\r
+Add customizable variable notmuch-show-indent-messages-in-thread\r
+to toggle indentation of messages in a thread in a notmuch-show\r
+buffer.\r
+---\r
+ emacs/notmuch-show.el |   13 ++++++++++---\r
+ 1 files changed, 10 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index f96743b..48df4c5 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -90,6 +90,11 @@ any given message."\r
+   :group 'notmuch\r
+   :type 'boolean)\r
\r
++(defcustom notmuch-show-indent-messages-in-thread t\r
++  "Should messages be indented according to their depth in a thread?"\r
++  :group 'notmuch\r
++  :type 'boolean)\r
++\r
+ (defcustom notmuch-show-indent-multipart nil\r
+   "Should the sub-parts of a multipart/* part be indented?"\r
+   ;; dme: Not sure which is a good default.\r
+@@ -237,8 +242,9 @@ unchanged ADDRESS if parsing fails."\r
+   "Insert a notmuch style headerline based on HEADERS for a\r
+ message at DEPTH in the current thread."\r
+   (let ((start (point)))\r
+-    (insert (notmuch-show-spaces-n depth)\r
+-          (notmuch-show-clean-address (plist-get headers :From))\r
++    (when notmuch-show-indent-messages-in-thread\r
++      (insert (notmuch-show-spaces-n depth)))\r
++    (insert (notmuch-show-clean-address (plist-get headers :From))\r
+           " ("\r
+           date\r
+           ") ("\r
+@@ -733,7 +739,8 @@ current buffer, if possible."\r
+     (setq content-end (point-marker))\r
\r
+     ;; Indent according to the depth in the thread.\r
+-    (indent-rigidly content-start content-end depth)\r
++    (when notmuch-show-indent-messages-in-thread\r
++      (indent-rigidly content-start content-end depth))\r
\r
+     (setq message-end (point-max-marker))\r
\r
+-- \r
+1.7.6\r
+\r