Headers of cited message are incorrectly rendered by function org-msg-save-article-for-reply-mu4e
Opened this issue · 1 comments
Something is not working right in the cl-loop
in org-msg-save-article-for-reply-mu4e
that collects the headers of the message article that is being replied to, when that message article includes additional citations. The message-fetch-field
function is returning extra copies of the Subject field and sometimes other fields as well.
For example, I tried replying to an email that had two previous messages cited. The most recent email had a subject line of something like "RE: [External] Case No. 1234," which was a reply to "[External] Case No. 1234," which was a reply to "Case No. 1234." The resulting Subject line in the citation in the HTML email exported by org-msg was: "Subject: RE: [External] Case No. 1234,[External] Case No. 1234,Case No. 1234." Curiously, it also included two names on the "From" field--the name of the actual sender, but also my name.
I tried substituting the org-msg-message-fetch-field
function in place of the regular message-fetch-field
function, to get the benefit of temporarily narrowing the buffer to the message head. That eliminated the duplication of the Subject field, but for some reason the message-fetch-field
function then missed a Cc: field that should have been included. I got a similar result when trying message-field-value
.
The problem may be a limitation of the underlying functions in message.el or mail-utils.el. I am not familiar enough with elisp and email to figure that out.
Sorry, I should have included version info:
emacs 29.4
org-msg 20240902.447