mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
emacs: make message indentation width customisable
Till now Emacs UI indents messages according to their respecive depth of neting in the thread. The actual width of indentation per level is hardcoded to `1' space. This patch makes message indentation customisable by introducing a variable `notmuch-indent-messages-width' which defaults to `1', which is the same as before. Felix could set this variable to `0' in order to disable indentation, I tested it with a value of `4' for a clearer separation of messages in a thread.
This commit is contained in:
parent
ae7814bd61
commit
46eb1c116a
1 changed files with 12 additions and 2 deletions
|
@ -91,6 +91,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.
|
||||
|
@ -238,7 +248,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
|
||||
|
@ -739,7 +749,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))
|
||||
|
||||
|
|
Loading…
Reference in a new issue