configure indentation width instead? (was: Re: [PATCH 2/2] Emacs: Add variable to toggle thread indentation to notmuch-show)

2011-08-16 Thread Michal Sojka
On Tue, 19 Jul 2011, Gregor Zattler wrote:
> Hi Felix, notmuch develpers,
> 
> Felix introduces a boolean configuration variable in order to
> disable/enable indentation.   Wouldn't it be more helpful and
> powerful to customise the indentation width with "0" meaning no
> indentation, "1" being the current behaviour, "2" meaning double
> indentation, "3" threefold indentation ...  ?

+1

Sometimes I find indenting by one character too small to find the
replied message in long threads.

-Michal


Re: configure indentation width instead? (was: Re: [PATCH 2/2] Emacs: Add variable to toggle thread indentation to notmuch-show)

2011-08-16 Thread Michal Sojka
On Tue, 19 Jul 2011, Gregor Zattler wrote:
 Hi Felix, notmuch develpers,
 
 Felix introduces a boolean configuration variable in order to
 disable/enable indentation.   Wouldn't it be more helpful and
 powerful to customise the indentation width with 0 meaning no
 indentation, 1 being the current behaviour, 2 meaning double
 indentation, 3 threefold indentation ...  ?

+1

Sometimes I find indenting by one character too small to find the
replied message in long threads.

-Michal
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


configure indentation width instead? (was: Re: [PATCH 2/2] Emacs: Add variable to toggle thread indentation to notmuch-show)

2011-07-19 Thread Gregor Zattler
Hi Felix, notmuch develpers,

Felix introduces a boolean configuration variable in order to
disable/enable indentation.   Wouldn't it be more helpful and
powerful to customise the indentation width with "0" meaning no
indentation, "1" being the current behaviour, "2" meaning double
indentation, "3" threefold indentation ...  ?

Just my 2 Euro-cents, Gregor


[PATCH 2/2] Emacs: Add variable to toggle thread indentation to notmuch-show

2011-07-19 Thread Felix Geller
Add customizable variable notmuch-show-indent-messages-in-thread
to toggle indentation of messages in a thread in a notmuch-show
buffer.
---
 emacs/notmuch-show.el |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index f96743b..48df4c5 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -90,6 +90,11 @@ any given message."
   :group 'notmuch
   :type 'boolean)

+(defcustom notmuch-show-indent-messages-in-thread t
+  "Should messages be indented according to their depth in a thread?"
+  :group 'notmuch
+  :type 'boolean)
+
 (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,8 +242,9 @@ 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)
-   (notmuch-show-clean-address (plist-get headers :From))
+(when notmuch-show-indent-messages-in-thread
+  (insert (notmuch-show-spaces-n depth)))
+(insert (notmuch-show-clean-address (plist-get headers :From))
" ("
date
") ("
@@ -733,7 +739,8 @@ current buffer, if possible."
 (setq content-end (point-marker))

 ;; Indent according to the depth in the thread.
-(indent-rigidly content-start content-end depth)
+(when notmuch-show-indent-messages-in-thread
+  (indent-rigidly content-start content-end depth))

 (setq message-end (point-max-marker))

-- 
1.7.6



configure indentation width instead? (was: Re: [PATCH 2/2] Emacs: Add variable to toggle thread indentation to notmuch-show)

2011-07-19 Thread Gregor Zattler
Hi Felix, notmuch develpers,

Felix introduces a boolean configuration variable in order to
disable/enable indentation.   Wouldn't it be more helpful and
powerful to customise the indentation width with 0 meaning no
indentation, 1 being the current behaviour, 2 meaning double
indentation, 3 threefold indentation ...  ?

Just my 2 Euro-cents, Gregor
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 2/2] Emacs: Add variable to toggle thread indentation to notmuch-show

2011-07-18 Thread Felix Geller
Add customizable variable notmuch-show-indent-messages-in-thread
to toggle indentation of messages in a thread in a notmuch-show
buffer.
---
 emacs/notmuch-show.el |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index f96743b..48df4c5 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -90,6 +90,11 @@ any given message.
   :group 'notmuch
   :type 'boolean)
 
+(defcustom notmuch-show-indent-messages-in-thread t
+  Should messages be indented according to their depth in a thread?
+  :group 'notmuch
+  :type 'boolean)
+
 (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,8 +242,9 @@ 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)
-   (notmuch-show-clean-address (plist-get headers :From))
+(when notmuch-show-indent-messages-in-thread
+  (insert (notmuch-show-spaces-n depth)))
+(insert (notmuch-show-clean-address (plist-get headers :From))
 (
date
) (
@@ -733,7 +739,8 @@ current buffer, if possible.
 (setq content-end (point-marker))
 
 ;; Indent according to the depth in the thread.
-(indent-rigidly content-start content-end depth)
+(when notmuch-show-indent-messages-in-thread
+  (indent-rigidly content-start content-end depth))
 
 (setq message-end (point-max-marker))
 
-- 
1.7.6

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch