[PATCH 1/2] Added variable to toggle message indendation in Emacs' notmuch-show
authorFelix Geller <fgeller@gmail.com>
Mon, 18 Jul 2011 18:57:44 +0000 (20:57 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:39:09 +0000 (09:39 -0800)
fe/608aae9fec3289750e475aeab71963b17ebbc4 [new file with mode: 0644]

diff --git a/fe/608aae9fec3289750e475aeab71963b17ebbc4 b/fe/608aae9fec3289750e475aeab71963b17ebbc4
new file mode 100644 (file)
index 0000000..88c33a4
--- /dev/null
@@ -0,0 +1,107 @@
+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 A5736431FD0\r
+       for <notmuch@notmuchmail.org>; Mon, 18 Jul 2011 11:58:40 -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 ydZW17-iZ8nQ for <notmuch@notmuchmail.org>;\r
+       Mon, 18 Jul 2011 11:58:40 -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 09C82431FB6\r
+       for <notmuch@notmuchmail.org>; Mon, 18 Jul 2011 11:58:39 -0700 (PDT)\r
+Received: by fxh19 with SMTP id 19so6761582fxh.19\r
+       for <notmuch@notmuchmail.org>; Mon, 18 Jul 2011 11:58:38 -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=7x4MAWpWObBdzaxYPUzaUFrDlGgcl7i8BMaBa6jJMgo=;\r
+       b=MlOXK4KnWVntBHk+BHiW7Ujk85MukGnWaUHGbjdlI0uVwbRQfNKz8qEkyPA3lF/peA\r
+       lcbKtoxCDyqcPV7tJHNECgrK4KHVi88pwrnCEZTjimO7tm+BDNhLhbyP7jDSheFkzC/+\r
+       WHVOhjKWHcJJ6Nboxt6mS6GXsFuNxIJWttBmA=\r
+Received: by 10.223.7.10 with SMTP id b10mr10550738fab.76.1311015518525;\r
+       Mon, 18 Jul 2011 11:58:38 -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 28sm3122122fax.3.2011.07.18.11.58.35\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Mon, 18 Jul 2011 11:58:37 -0700 (PDT)\r
+Received: by localhorst.example.com (Postfix, from userid 501)\r
+       id 5FA2D471E0B4; Mon, 18 Jul 2011 20:58:34 +0200 (CEST)\r
+From: Felix Geller <fgeller@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/2] Added variable to toggle message indendation in Emacs'\r
+       notmuch-show\r
+Date: Mon, 18 Jul 2011 20:57:44 +0200\r
+Message-Id: <1311015465-8136-1-git-send-email-fgeller@gmail.com>\r
+X-Mailer: git-send-email 1.7.6\r
+In-Reply-To: <874o2j4f1e.fsf@servo.factory.finestructure.net>\r
+References: <874o2j4f1e.fsf@servo.factory.finestructure.net>\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 18:58:40 -0000\r
+\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