GNU bug report logs - #31651
26.1.50; message-forward-included-headers should contain "^$"

Previous Next

Package: emacs;

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.

Full log


Message #11 received at 31651 <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Andreas Schwab <schwab <at> suse.de>
Cc: 31651 <at> debbugs.gnu.org
Subject: Re: bug#31651: 26.1.50;
 message-forward-included-headers should contain "^$"
Date: Thu, 31 May 2018 08:30:37 +0900
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))




This bug report was last modified 6 years and 354 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.