[PATCH 1/2] emacs: add customisation for message indentation width
Gregor Zattler
telegraph at gmx.net
Sun Oct 23 09:52:43 PDT 2011
Messages are shown indented according to their depth in message
threads. Previously indentation width was hardcoded to `1'
space. This patch adds a new variable `notmuch-indent-messages-width'
which governs how many spaces are used per level of indentation.
Defaults to `1' for compatibility with previous behaviour.
---
emacs/notmuch-show.el | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 8db5435..897b492 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -90,6 +90,16 @@ any given message."
:group 'notmuch
:type 'boolean)
+(defcustom notmuch-indent-messages-width 1
+ "Width of message indentation in threads.
+
+Messages are shown indented according to their depth in a thread.
+This variable determines the width of this indentation measured
+in number of blanks. Defaults to `1', choose `0' to disable
+indentation."
+ :group 'notmuch
+ :type 'integer)
+
(defcustom notmuch-show-indent-multipart nil
"Should the sub-parts of a multipart/* part be indented?"
;; dme: Not sure which is a good default.
@@ -237,7 +247,7 @@ unchanged ADDRESS if parsing fails."
"Insert a notmuch style headerline based on HEADERS for a
message at DEPTH in the current thread."
(let ((start (point)))
- (insert (notmuch-show-spaces-n depth)
+ (insert (notmuch-show-spaces-n (* notmuch-indent-messages-width depth))
(notmuch-show-clean-address (plist-get headers :From))
" ("
date
@@ -738,7 +748,7 @@ current buffer, if possible."
(setq content-end (point-marker))
;; Indent according to the depth in the thread.
- (indent-rigidly content-start content-end depth)
+ (indent-rigidly content-start content-end (* notmuch-indent-messages-width depth))
(setq message-end (point-max-marker))
--
1.7.7
More information about the notmuch
mailing list