[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Control body encoding of Gcc copies (was: Don't encrypt Gcc'ed messages)
From: |
Christopher Schmidt |
Subject: |
Control body encoding of Gcc copies (was: Don't encrypt Gcc'ed messages) |
Date: |
Tue, 13 Mar 2012 19:01:14 +0100 |
Christopher Schmidt <christopher@ch.ristopher.com> writes:
> is there any way to get Gnus to ignore mml encrypt tags when storing
> sent mail in a Gcc group? (I looked in gnus-inews-do-gcc but it looks
> like there is no customisation point or handy hook that I could use to
> achieve that.)
Here is a patch for Gnus master that adds more flexibility to
gnus-inews-do-gcc.
diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el
index 9411f46..d158600 100644
--- a/lisp/gnus-msg.el
+++ b/lisp/gnus-msg.el
@@ -313,6 +313,20 @@ If nil, the address field will always be empty after
invoking
:group 'gnus-message
:type 'boolean)
+(defcustom gnus-gcc-pre-body-encode-hook nil
+ "A hook called before encoding the body of the Gcc copy of a message.
+Changes made to the message will only affect the Gcc copy, but
+not the original message."
+ :group 'gnus-message
+ :type 'hook)
+
+(defcustom gnus-gcc-post-body-encode-hook nil
+ "A hook called after encoding the body of the Gcc copy of a message.
+Changes made to the message will only affect the Gcc copy, but
+not the original message."
+ :group 'gnus-message
+ :type 'hook)
+
(autoload 'gnus-message-citation-mode "gnus-cite" nil t)
;;; Internal variables.
@@ -1643,7 +1657,9 @@ this is a reply."
(nnheader-set-temp-buffer " *acc*")
(setq message-options (with-current-buffer cur message-options))
(insert-buffer-substring cur)
+ (run-hooks 'gnus-gcc-pre-body-encode-hook)
(message-encode-message-body)
+ (run-hooks 'gnus-gcc-post-body-encode-hook)
(save-restriction
(message-narrow-to-headers)
(let* ((mail-parse-charset message-default-charset)
Is this one OK?
Christopher
- Don't encrypt Gcc'ed messages, Christopher Schmidt, 2012/03/12
- Control body encoding of Gcc copies (was: Don't encrypt Gcc'ed messages),
Christopher Schmidt <=