[PATCH v1 4/4] emacs: reply: Allow washing of inserted text parts during reply

David Edmondson dme at dme.org
Sun Aug 27 06:46:23 PDT 2017


When inserting a text/plain part during reply generation, add a hook
that allows the user to improve the display of the part.

As an example, the function `notmuch-wash-tidy-citations' might be
called.
---
 emacs/notmuch-mua.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index fd64b362..4d352626 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -115,6 +115,13 @@ mutiple parts get a header."
 		(function :tag "Other"))
   :group 'notmuch-reply)
 
+(defcustom notmuch-mua-reply-text/plain-hook nil
+  "Functions used to improve the display of text/plain parts in replies.
+
+This is analogous to `notmuch-show-insert-text/plain-hook'."
+  :type 'hook
+  :group 'notmuch-reply)
+
 ;;
 
 (defun notmuch-mua-get-switch-function ()
@@ -249,7 +256,7 @@ mutiple parts get a header."
 		      ;; Don't attempt to clean up messages, excerpt
 		      ;; citations, etc. in the original message before
 		      ;; quoting.
-		      ((notmuch-show-insert-text/plain-hook nil)
+		      ((notmuch-show-insert-text/plain-hook notmuch-mua-reply-text/plain-hook)
 		       ;; Don't omit long parts.
 		       (notmuch-show-max-text-part-size 0)
 		       ;; Insert headers for parts as appropriate for replying.
-- 
2.11.0



More information about the notmuch mailing list