mirror of https://github.com/djcb/mu.git
mu4e-compose: explicitly remove Date: before update
Seems older emacsen require that or they won't update the Date, see issue #2502.
This commit is contained in:
parent
9316d8955b
commit
2ebdf23dd0
|
@ -445,6 +445,9 @@ If MSGPATH is nil, do nothing."
|
||||||
(message-narrow-to-headers)
|
(message-narrow-to-headers)
|
||||||
(unless (message-fetch-field "Message-ID")
|
(unless (message-fetch-field "Message-ID")
|
||||||
(message-generate-headers '(Message-ID)))
|
(message-generate-headers '(Message-ID)))
|
||||||
|
;; older Emacsen (<= 28 perhaps?) won't update the Date
|
||||||
|
;; if there already is one; so make sure it's gone.
|
||||||
|
(message-remove-header "Date")
|
||||||
(message-generate-headers '(Date)))
|
(message-generate-headers '(Date)))
|
||||||
(mu4e--delimit-headers 'undelimit))) ;; remove separator
|
(mu4e--delimit-headers 'undelimit))) ;; remove separator
|
||||||
|
|
||||||
|
@ -539,11 +542,13 @@ appropriate flag at the message forwarded or replied-to."
|
||||||
;; Remove References: if In-Reply-To: is missing.
|
;; Remove References: if In-Reply-To: is missing.
|
||||||
;; This allows the user to effectively start a new message-thread by
|
;; This allows the user to effectively start a new message-thread by
|
||||||
;; removing the In-Reply-To header.
|
;; removing the In-Reply-To header.
|
||||||
|
(save-restriction
|
||||||
|
(message-narrow-to-headers)
|
||||||
(when (eq mu4e-compose-type 'reply)
|
(when (eq mu4e-compose-type 'reply)
|
||||||
(unless (message-fetch-field "In-Reply-To")
|
(unless (message-fetch-field "In-Reply-To")
|
||||||
(message-remove-header "References")))
|
(message-remove-header "References")))
|
||||||
(when use-hard-newlines
|
(when use-hard-newlines
|
||||||
(mu4e--send-harden-newlines))
|
(mu4e--send-harden-newlines)))
|
||||||
;; for safety, always save the draft before sending
|
;; for safety, always save the draft before sending
|
||||||
(set-buffer-modified-p t)
|
(set-buffer-modified-p t)
|
||||||
(save-buffer))
|
(save-buffer))
|
||||||
|
|
Loading…
Reference in New Issue