diff options
author | Jani Nikula <jani@nikula.org> | 2012-03-04 10:25:38 +0200 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2012-03-10 21:24:14 -0400 |
commit | 90f310b4fb8903898ead674059584737e448eb8a (patch) | |
tree | 32dcfac5eb5780341bc0bf47393322bca8d52770 /emacs/notmuch-mua.el | |
parent | cfc5f1059aa16753cba610c41601cacc97260e08 (diff) |
emacs: fix MML quoting in replies
The reply MML quoting added in commit ae438cc unintentionally MML
quotes also the signature/encryption MML tags added via
message-setup-hook, causing the reply not to be signed/encrypted.
MML quote just the original message in the temp buffer before
inserting it to the message buffer, to not interfere with message mode
hooks or message construction in general.
See [1] and [2] for bug reports.
Thanks to Tim Bielawa <tbielawa@redhat.com> for testing.
[1] id:"87hay78x6l.fsf@wyzanski.jamesvasile.com"
[2] id:"1330812262-28272-1-git-send-email-tbielawa@redhat.com".
Signed-off-by: Jani Nikula <jani@nikula.org>
Diffstat (limited to 'emacs/notmuch-mua.el')
-rw-r--r-- | emacs/notmuch-mua.el | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 4be7c13d..13244eb8 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -95,6 +95,9 @@ list." (goto-char (point-min)) (setq headers (mail-header-extract))))) (forward-line 1) + ;; Original message may contain (malicious) MML tags. We must + ;; properly quote them in the reply. + (mml-quote-region (point) (point-max)) (setq body (buffer-substring (point) (point-max)))) ;; If sender is non-nil, set the From: header to its value. (when sender @@ -116,12 +119,7 @@ list." (push-mark)) (set-buffer-modified-p nil) - (message-goto-body) - ;; Original message may contain (malicious) MML tags. We must - ;; properly quote them in the reply. Note that using `point-max' - ;; instead of `mark' here is wrong. The buffer may include user's - ;; signature which should not be MML-quoted. - (mml-quote-region (point) (mark))) + (message-goto-body)) (defun notmuch-mua-forward-message () (message-forward) |