Hi Hiroshi,
On Thursday Apr 17 2025, Hiroshi Shimodaira wrote:
> Hi Dirk,
>
> Thank you for the pointer, but unfortunately, I don't speak Elisp :-(
> Instead, by using the grep command, I think I've figured out a possible
> cause.
>
> It seems that the following line in mu4e--compose-before-save in
> mu4e-draft.el removes all Date fields.
> (message-remove-header "Date")
>
> When I comment it out, the issue seems to be resolved (without
> side-effects?).
> However, the function mu4e--compose-before-save appears to have been
> unchanged since mu 1.12.3.
> So, I suspect that the Gnus function message-remove-header may have
> recently changed its behaviour, but I've not looked into yet.
Ah, that gives some good hint: the problem happened only when save the
draft (which is why I didn't see it and suspected Gnus). The other hint
is that it removed the header in the _forwarded_ message, which it
shouldn't touch at all.
So, the problem is (in mu4e) was that message-remove-header expects to
be called while we've narrowed the buffer to just the headers
('message-narrow-to-headers'); otherwise, it will go through the whole
message deleting 'Date:' when it sees them... as you've discovered.
I've pushed a fix; thanks!