[PATCH 1/2] emacs: add customisation for message indentation width
authorGregor Zattler <telegraph@gmx.net>
Sun, 23 Oct 2011 16:52:43 +0000 (18:52 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:39:43 +0000 (09:39 -0800)
2b/ca988b03c4b8d0e19069cd109e63934b1d9e46 [new file with mode: 0644]

diff --git a/2b/ca988b03c4b8d0e19069cd109e63934b1d9e46 b/2b/ca988b03c4b8d0e19069cd109e63934b1d9e46
new file mode 100644 (file)
index 0000000..3ea9ec6
--- /dev/null
@@ -0,0 +1,112 @@
+Return-Path: <error4me@gmx.de>\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 7D9BF431FD0\r
+       for <notmuch@notmuchmail.org>; Sun, 23 Oct 2011 09:53:17 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.001\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.001 tagged_above=-999 required=5\r
+       tests=[FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001]\r
+       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 xOlJN8ofVacC for <notmuch@notmuchmail.org>;\r
+       Sun, 23 Oct 2011 09:53:17 -0700 (PDT)\r
+Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22])\r
+       by olra.theworths.org (Postfix) with SMTP id BE831431FB6\r
+       for <notmuch@notmuchmail.org>; Sun, 23 Oct 2011 09:53:16 -0700 (PDT)\r
+Received: (qmail invoked by alias); 23 Oct 2011 16:53:15 -0000\r
+Received: from p54BE2C59.dip.t-dialin.net (EHLO shi.workgroup) [84.190.44.89]\r
+       by mail.gmx.net (mp058) with SMTP; 23 Oct 2011 18:53:15 +0200\r
+X-Authenticated: #19296480\r
+X-Provags-ID: V01U2FsdGVkX1/74t141lD7zpTc1GAzPjKYhQF4aPNOKwLahK06nI\r
+       Ahnzqlfwvsjk0f\r
+Received: from grfz by shi.workgroup with local (Exim 4.77)\r
+       (envelope-from <error4me@gmx.de>)\r
+       id 1RI1IF-0000Al-Q5; Sun, 23 Oct 2011 18:53:03 +0200\r
+Date: Sun, 23 Oct 2011 18:52:43 +0200\r
+From: Gregor Zattler <telegraph@gmx.net>\r
+To: notmuch <notmuch@notmuchmail.org>\r
+Subject: [PATCH 1/2] emacs: add customisation for message indentation width\r
+Message-ID: <20111023165243.GD21842@shi.workgroup>\r
+Mail-Followup-To: notmuch <notmuch@notmuchmail.org>\r
+References: <87vcuz2yga.fsf@servo.factory.finestructure.net>\r
+       <1311028119-50637-1-git-send-email-fgeller@gmail.com>\r
+       <1311028119-50637-3-git-send-email-fgeller@gmail.com>\r
+       <20110719105059.GA6472@shi.workgroup>\r
+       <87wrednlzz.fsf@steelpick.2x.cz>\r
+       <20111023164324.GC21842@shi.workgroup>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <20111023164324.GC21842@shi.workgroup>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Y-GMX-Trusted: 0\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: Sun, 23 Oct 2011 16:53:17 -0000\r
+\r
+Messages are shown indented according to their depth in message\r
+threads.  Previously indentation width was hardcoded to `1'\r
+space.  This patch adds a new variable `notmuch-indent-messages-width' \r
+which governs how many spaces are used per level of indentation.\r
+Defaults to `1' for compatibility with previous behaviour.\r
+---\r
+ emacs/notmuch-show.el |   14 ++++++++++++--\r
+ 1 files changed, 12 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 8db5435..897b492 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -90,6 +90,16 @@ any given message."\r
+   :group 'notmuch\r
+   :type 'boolean)\r
\r
++(defcustom notmuch-indent-messages-width 1\r
++  "Width of message indentation in threads.\r
++\r
++Messages are shown indented according to their depth in a thread.\r
++This variable determines the width of this indentation measured\r
++in number of blanks.  Defaults to `1', choose `0' to disable\r
++indentation."\r
++  :group 'notmuch\r
++  :type 'integer)\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,7 +247,7 @@ 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
++    (insert (notmuch-show-spaces-n (* notmuch-indent-messages-width depth))\r
+           (notmuch-show-clean-address (plist-get headers :From))\r
+           " ("\r
+           date\r
+@@ -738,7 +748,7 @@ 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
++    (indent-rigidly content-start content-end (* notmuch-indent-messages-width depth))\r
\r
+     (setq message-end (point-max-marker))\r
\r
+-- \r
+1.7.7\r
+\r