GNU bug report logs -
#31651
26.1.50; message-forward-included-headers should contain "^$"
Previous Next
Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>
Date: Wed, 30 May 2018 03:09:02 UTC
Severity: normal
Found in version 26.1.50
Done: Katsumi Yamaoka <yamaoka <at> jpl.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31651 in the body.
You can then email your comments to 31651 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31651
; Package
emacs
.
(Wed, 30 May 2018 03:09:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Katsumi Yamaoka <yamaoka <at> jpl.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 30 May 2018 03:09:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
The docstring of `message-forward-included-headers' says:
This variable should be a regexp or a list of regexps.
But if it is a regexp, it should contain "^$" like:
"^$\\|^\\(?:Cc\\|Date\\|From\\|In-Reply-To\\|Message-Id\\|References\\|Reply-To\\|Subject\\|To\\|User-Agent\\|X-Mailer\\):"
Or the header separator in a forward message will be removed
and the message will get malformed.
A better way to solve this issue would be to improve the
`message-remove-ignored-headers' code rather than adding a causion
to the docstring of `message-forward-included-headers', I think.
I use `message-forward-as-mime' with t as it was before.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31651
; Package
emacs
.
(Wed, 30 May 2018 07:57:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 31651 <at> debbugs.gnu.org (full text, mbox):
On Mai 30 2018, Katsumi Yamaoka <yamaoka <at> jpl.org> wrote:
> But if it is a regexp, it should contain "^$" like:
>
> "^$\\|^\\(?:Cc\\|Date\\|From\\|In-Reply-To\\|Message-Id\\|References\\|Reply-To\\|Subject\\|To\\|User-Agent\\|X-Mailer\\):"
>
> Or the header separator in a forward message will be removed
> and the message will get malformed.
I think this is a bug. The empty line is not a header line, so it
should not be matched against.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab <at> suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31651
; Package
emacs
.
(Wed, 30 May 2018 23:31:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 31651 <at> debbugs.gnu.org (full text, mbox):
On Wed, 30 May 2018 09:56:11 +0200, Andreas Schwab wrote:
> I think this is a bug. The empty line is not a header line, so it
> should not be matched against.
Though I was going to apply the following first change, I came
to think you are right and committed the second one. Thanks.
1. Make `message-remove-ignored-headers' exclude header separator
when narrowing.
--- message.el~ 2018-01-12 03:53:45.394148600 +0000
+++ message.el 2018-05-30 22:49:55.198043700 +0000
@@ -7393,3 +7393,6 @@
(narrow-to-region (point)
- (or (search-forward "\n\n" nil t) (point)))
+ (if (search-forward "\n\n" nil t)
+ ;; Exclude header separator.
+ (1- (match-end 0))
+ (point)))
(when message-forward-ignored-headers
2. Make `message-remove-header' not remove things not looking
like header ("[!-9;-~]+:" comes from RFC2822 section 2.2).
--- message.el~ 2018-01-12 03:53:45.394148600 +0000
+++ message.el 2018-05-30 22:49:55.198043700 +0000
@@ -2433,3 +2433,5 @@
(if (if reverse
- (not (looking-at regexp))
+ (and (not (looking-at regexp))
+ ;; Don't remove things not looking like header.
+ (looking-at "[!-9;-~]+:"))
(looking-at regexp))
bug closed, send any further explanations to
31651 <at> debbugs.gnu.org and Katsumi Yamaoka <yamaoka <at> jpl.org>
Request was from
Katsumi Yamaoka <yamaoka <at> jpl.org>
to
control <at> debbugs.gnu.org
.
(Thu, 31 May 2018 08:05:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 28 Jun 2018 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 353 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.