mu4e-compose: use raw message to feed message-forward

Seemingly, message-forwarded needs the raw message, not the decode one
for proper forwarding when the parent message is encoded in some way.

Add a little hack / workaround for that.

See #2662.
This commit is contained in:
Dirk-Jan C. Binnema
2024-05-01 18:37:48 +03:00
parent e2bf38298d
commit 808d725254

View File

@ -427,8 +427,13 @@ variables message-forward-as-mime and
(message-field-value "Message-Id" t)
(message-field-value "References")
0 0 ""))
(with-current-buffer (mu4e--message-call #'message-forward)
(current-buffer))))))
;; a bit of a hack; mu4e--draft-with-parent will insert the decoded
;; version of the message, but that's not good enough for
;; message-forward, which needs the raw message instead; see #2662.
(erase-buffer)
(insert-file-contents-literally (mu4e-message-readable-path parent))
(with-current-buffer (mu4e--message-call #'message-forward)
(current-buffer))))))
;;;###autoload
(defun mu4e-compose-edit()