[PATCH 1/2] Added variable to toggle message indendation in Emacs' notmuch-show

2011-07-18 Thread Felix Geller
---
 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



[PATCH 1/2] Added variable to toggle message indendation in Emacs' notmuch-show

2011-07-18 Thread Jameson Graef Rollins
Hi, Felix.  Thanks for resubmitting these patches.  A couple more
comments:

Remember to include a longer log message with you patch.  Beyond just
the single line commit message, the patch should also include a longer
commit message, separated from the first line by a blank line, that
explains what exactly the patch is doing and why.

We've also been trying to get in the habit of sending patches to the
test suite *first*, before the patch that actually implements the
change.  The reason being that we can apply the test-suite patch first,
see that the feature or bug fix you're trying to implement is not
implemented, then apply the fix and see that everything is working
again.

Now is probably a good time to remind everyone to look at the GIT patch
submission guidlines, which notmuch has been trying to follow (also
linked from http://notmuchmail.org):

http://repo.or.cz/w/git.git?a=blob;f=Documentation/SubmittingPatches;hb=HEAD

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 



Re: [PATCH 1/2] Added variable to toggle message indendation in Emacs' notmuch-show

2011-07-18 Thread Jameson Graef Rollins
Hi, Felix.  Thanks for resubmitting these patches.  A couple more
comments:

Remember to include a longer log message with you patch.  Beyond just
the single line commit message, the patch should also include a longer
commit message, separated from the first line by a blank line, that
explains what exactly the patch is doing and why.

We've also been trying to get in the habit of sending patches to the
test suite *first*, before the patch that actually implements the
change.  The reason being that we can apply the test-suite patch first,
see that the feature or bug fix you're trying to implement is not
implemented, then apply the fix and see that everything is working
again.

Now is probably a good time to remind everyone to look at the GIT patch
submission guidlines, which notmuch has been trying to follow (also
linked from http://notmuchmail.org):

http://repo.or.cz/w/git.git?a=blob;f=Documentation/SubmittingPatches;hb=HEAD

jamie.


pgppLcd7ncz26.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch