mirror of https://github.com/djcb/mu.git
mu4e-compose/compose-mail: add brackets for in-reply-to
Seems in some contexts we get them _without_ brackets in other-headers; so let's fix that up. Fixes #2273.
This commit is contained in:
parent
48695a1981
commit
ff8e0455dc
|
@ -858,11 +858,15 @@ buffer buried."
|
||||||
(message-add-header (concat "Subject: " subject "\n"))
|
(message-add-header (concat "Subject: " subject "\n"))
|
||||||
|
|
||||||
;; add any other headers specified
|
;; add any other headers specified
|
||||||
(when other-headers
|
(seq-each (lambda(hdr)
|
||||||
(dolist (h other-headers other-headers)
|
(let ((field (capitalize(car hdr))) (value (cdr hdr)))
|
||||||
(if (symbolp (car h)) (setcar h (symbol-name (car h))))
|
;; fix in-reply without <>
|
||||||
(message-add-header
|
(when (and (string= field "In-Reply-To")
|
||||||
(concat (capitalize (car h)) ": " (cdr h) "\n" ))))
|
(string-match-p "\\`[^ @]+@[^ @]+\\'" value)
|
||||||
|
(not (string-match-p "\\`<.*>\\'" value)))
|
||||||
|
(setq value (concat "<" value ">")))
|
||||||
|
(message-add-header (concat (capitalize field) ": " value "\n"))))
|
||||||
|
other-headers)
|
||||||
|
|
||||||
;; yank message
|
;; yank message
|
||||||
(if (bufferp yank-action)
|
(if (bufferp yank-action)
|
||||||
|
|
Loading…
Reference in New Issue