GNU bug report logs -
#53991
Fix header mangling by message-hide-headers
Previous Next
Reported by: Philip Kaludercic <philipk <at> posteo.net>
Date: Mon, 14 Feb 2022 09:06:01 UTC
Severity: normal
Tags: patch
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tags: patch
I have been having issues with mangled headers for a while not,
especially when resuming a message using C-u C-x m. This could result
in headers being inserted right in the middle of other headers resulting
in stuff like this:
To: bug-gnuReferences: <...>
-emacs <at> gnu.org
that in the best case raises an issue when being sent, in the worse case
silently breaks without you knowing that it was broken.
It appears this was caused by setting mail-user-agent to
'gnus-user-agent. In gnus-msg-mail, gnus-setup-message calls
message-hide-headers that would try to reorder the headers so that the
headers indicated by message-hidden-headers are placed at the beginning
of the buffer, then narrowed away. The simplest fix for this issue in
case anyone were to stumble upon it in the future is to set the
message-hidden-headers to nil.
The more complex solution is attached below, and involves replacing the
manual end-of-headers tracking with a marker, that resolves the issue
that the previous implementation had, where end-of-headers could point
right into the middle of a header as described above.
In GNU Emacs 29.0.50 (build 6, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars)
of 2022-02-06 built on icterid
Repository revision: b0fd3ec2c0131e79b1c62e1f1beb6f29cf076120
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)
Configured using:
'configure --with-x-toolkit=athena --with-native-compilation
'CFLAGS=-Os -march=native -mtune=native -pipe' LDFLAGS=-flto'
[0001-Improve-stability-of-message-hide-headers.patch (text/patch, attachment)]
[Message part 3 (text/plain, inline)]
--
Philip Kaludercic
This bug report was last modified 3 years and 158 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.