unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] Emacs: Add variable to toggle message indentation in a thread
@ 2011-07-11  8:42 Felix Geller
  2011-07-11  8:53 ` Dmitry Kurochkin
                   ` (2 more replies)
  0 siblings, 3 replies; 35+ messages in thread
From: Felix Geller @ 2011-07-11  8:42 UTC (permalink / raw)
  To: notmuch

[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]

Hi,

I added a variable to toggle message indentation in Emacs.

Please let me know what you think.


Cheers,
Felix


diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index a433dec..8101c27 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 nil
+  "Should the messages in a thread be indented according to their respective depth in the 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,7 +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)
+    (insert (if notmuch-show-indent-messages-in-thread
+		(notmuch-show-spaces-n depth)
+	      "")
 	    (notmuch-show-clean-address (plist-get headers :From))
 	    " ("
 	    date
@@ -733,7 +740,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))
 

[-- Attachment #2: Type: application/pgp-signature, Size: 202 bytes --]

^ permalink raw reply related	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2011-11-26  5:18 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-11  8:42 [PATCH] Emacs: Add variable to toggle message indentation in a thread Felix Geller
2011-07-11  8:53 ` Dmitry Kurochkin
2011-07-11  9:24   ` Felix Geller
2011-07-11  9:55     ` Dmitry Kurochkin
2011-07-11 10:09       ` Felix Geller
2011-07-11  8:57 ` Daniel Schoepe
2011-07-11 16:32 ` Jameson Graef Rollins
2011-07-12 23:46   ` Felix Geller
2011-07-16 13:25     ` Felix Geller
2011-07-18 18:30     ` Jameson Graef Rollins
2011-07-18 18:57       ` [PATCH 1/2] Added variable to toggle message indendation in Emacs' notmuch-show Felix Geller
2011-07-18 18:57         ` [PATCH 2/2] Test for toggling message indentation Felix Geller
2011-07-18 19:14         ` [PATCH 1/2] Added variable to toggle message indendation in Emacs' notmuch-show Jameson Graef Rollins
2011-07-18 22:28           ` [PATCH] Emacs: Toggle message indentation for threads in notmuch-show Felix Geller
2011-07-18 22:28             ` [PATCH 1/2] Emacs: Test for turning off indentation of messages in threads Felix Geller
2011-07-18 22:28             ` [PATCH 2/2] Emacs: Add variable to toggle thread indentation to notmuch-show Felix Geller
2011-07-19 10:50               ` configure indentation width instead? (was: Re: [PATCH 2/2] Emacs: Add variable to toggle thread indentation to notmuch-show) Gregor Zattler
2011-08-16 20:24                 ` Michal Sojka
2011-10-23 16:43                   ` [PATCH] emacs: make message indentation width customisable (was: Re: configure indentation width instead?) Gregor Zattler
2011-10-23 16:52                     ` [PATCH 1/2] emacs: add customisation for message indentation width Gregor Zattler
2011-10-23 17:00                     ` [PATCH] emacs: make message indentation width customisable (was: Re: configure indentation width instead?) David Bremner
2011-10-23 17:00                     ` [PATCH 2/2] Emacs: test: notmuch-show for a message thread without the indentation Gregor Zattler
2011-10-23 19:09                       ` sorry, this test does not work (was: Re: [PATCH 2/2] Emacs: test: notmuch-show for a message thread without the indentation) Gregor Zattler
2011-10-23 19:38                         ` [PATCH 2a/2] emacs: test notmuch-indent-messages-width default Gregor Zattler
2011-11-24 13:13                           ` David Bremner
2011-11-24 22:03                             ` [PATCH 0/4] emacs: make message indentation width customisable (was: Re: [PATCH 2a/2] emacs: test notmuch-indent-messages-width default) Gregor Zattler
2011-11-24 22:03                               ` [PATCH 1/4] emacs: make message indentation width customisable Gregor Zattler
2011-11-24 22:03                               ` [PATCH 2/4] emacs: test notmuch-indent-messages-width default Gregor Zattler
2011-11-24 22:03                               ` [PATCH 3/4] emacs: test: notmuch show without indentation Gregor Zattler
2011-11-24 22:03                               ` [PATCH 4/4] emacs: test notmuch show with fourfold message indentation Gregor Zattler
2011-11-26  5:18                               ` [PATCH 0/4] emacs: make message indentation width customisable (was: Re: [PATCH 2a/2] emacs: test notmuch-indent-messages-width default) David Bremner
2011-10-23 19:41                         ` [PATCH 2b/2] emacs: test: notmuch show without indentation Gregor Zattler
2011-10-23 19:42                         ` [PATCH 2c/2] emacs: test notmuch show with fourfold message indentation Gregor Zattler
2011-07-18 19:04       ` [PATCH] Emacs: Add variable to toggle message indentation in a thread Felix Geller
2011-07-18 19:10         ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).