mirror of https://github.com/djcb/mu.git
mu4e-compose: include references / in-reply-to
For replies and forwarded messages.
This commit is contained in:
parent
5b29ad8b6d
commit
541c818a9f
|
@ -666,18 +666,20 @@ PARENT is the \"parent\" message; nil
|
|||
(message-required-mail-headers
|
||||
(seq-filter #'identity ;; ensure needed headers are generated.
|
||||
`(From Subject Date Message-ID
|
||||
,(when (eq mu4e-compose-type 'reply) 'In-Reply-To)
|
||||
,(when (eq mu4e-compose-type 'reply) 'In-Reply-To)
|
||||
,(when (memq mu4e-compose-type '(reply forward))
|
||||
'References))
|
||||
;; XXX vvv these two don't work. why not?
|
||||
;; ,(when message-newsreader 'User-Agent)
|
||||
;; ,(when message-user-organization 'Organization)
|
||||
)))
|
||||
))
|
||||
(message-this-is-mail t))
|
||||
;; we handle it ourselves.
|
||||
(setq-local gnus-message-replysign nil
|
||||
gnus-message-replyencrypt nil
|
||||
gnus-message-replysignencrypted nil)
|
||||
(when parent
|
||||
(insert (mu4e-view-message-text parent)))
|
||||
(insert (mu4e-view-message-text parent 'all-headers)))
|
||||
(goto-char (point-min))
|
||||
;; annoyingly, various message- functions call `message-pop-to-buffer`
|
||||
;; (showing the message. But we're not ready for that yet. So
|
||||
|
|
|
@ -660,17 +660,17 @@ As a side-effect, a message that is being viewed loses its
|
|||
(let ((inhibit-read-only t))
|
||||
(run-hooks 'mu4e-view-rendered-hook))))
|
||||
|
||||
(defun mu4e-view-message-text (msg)
|
||||
"Return the pristine MSG as a string."
|
||||
;; we need this for replying/forwarding, since the mu4e-compose
|
||||
;; wants it that way.
|
||||
(defun mu4e-view-message-text (msg &optional all-headers)
|
||||
"Return the pristine MSG as a string.
|
||||
If ALL-HEADERS is non-nil, include all headers."
|
||||
(with-temp-buffer
|
||||
(insert-file-contents-literally
|
||||
(mu4e-message-readable-path msg) nil nil nil t)
|
||||
(let ((gnus-inhibit-mime-unbuttonizing nil)
|
||||
(gnus-unbuttonized-mime-types '(".*/.*")))
|
||||
(mu4e--view-render-buffer msg))
|
||||
(buffer-substring-no-properties (point-min) (point-max))))
|
||||
(gnus-unbuttonized-mime-types '(".*/.*"))
|
||||
(gnus-inhibit-hiding all-headers))
|
||||
(gnus-article-prepare-display)
|
||||
(buffer-substring-no-properties (point-min) (point-max)))))
|
||||
|
||||
(defun mu4e-action-view-in-browser (msg &optional skip-headers)
|
||||
"Show current MSG in browser if it includes an HTML-part.
|
||||
|
|
Loading…
Reference in New Issue