From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.bugs Subject: bug#31651: 26.1.50; message-forward-included-headers should contain "^$" Date: Thu, 31 May 2018 08:30:37 +0900 Organization: Emacsen advocacy group Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1527722950 16401 195.159.176.226 (30 May 2018 23:29:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 30 May 2018 23:29:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (x86_64-unknown-cygwin) Cc: 31651@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 31 01:29:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOAWb-00045v-US for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 May 2018 01:29:02 +0200 Original-Received: from localhost ([::1]:41223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOAYj-0003pc-2X for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 May 2018 19:31:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOAYc-0003pW-NI for bug-gnu-emacs@gnu.org; Wed, 30 May 2018 19:31:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOAYY-0001lX-MR for bug-gnu-emacs@gnu.org; Wed, 30 May 2018 19:31:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47569) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOAYY-0001lS-Im for bug-gnu-emacs@gnu.org; Wed, 30 May 2018 19:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fOAYY-0008L0-56 for bug-gnu-emacs@gnu.org; Wed, 30 May 2018 19:31:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Katsumi Yamaoka Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 May 2018 23:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31651 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31651-submit@debbugs.gnu.org id=B31651.152772305032030 (code B ref 31651); Wed, 30 May 2018 23:31:02 +0000 Original-Received: (at 31651) by debbugs.gnu.org; 30 May 2018 23:30:50 +0000 Original-Received: from localhost ([127.0.0.1]:55466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOAYM-0008KY-0V for submit@debbugs.gnu.org; Wed, 30 May 2018 19:30:50 -0400 Original-Received: from buffalo.ash.relay.mailchannels.net ([23.83.222.24]:43366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOAYJ-0008KM-3N for 31651@debbugs.gnu.org; Wed, 30 May 2018 19:30:49 -0400 X-Sender-Id: tih5qno0ow|x-authuser|yamaoka@hampton.hostforweb.net Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 05C7F281840; Wed, 30 May 2018 23:30:43 +0000 (UTC) Original-Received: from hampton.hostforweb.net (unknown [100.96.28.18]) (Authenticated sender: tih5qno0ow) by relay.mailchannels.net (Postfix) with ESMTPA id 8AD2A281A37; Wed, 30 May 2018 23:30:42 +0000 (UTC) X-Sender-Id: tih5qno0ow|x-authuser|yamaoka@hampton.hostforweb.net Original-Received: from hampton.hostforweb.net (hampton.hostforweb.net [172.19.51.240]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.15.2); Wed, 30 May 2018 23:30:42 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: tih5qno0ow|x-authuser|yamaoka@hampton.hostforweb.net X-MailChannels-Auth-Id: tih5qno0ow X-Shoe-Wipe: 526f64052512252a_1527723042884_2393651436 X-MC-Loop-Signature: 1527723042884:2197870205 X-MC-Ingress-Time: 1527723042884 Original-Received: from s70.gtokyofl21.vectant.ne.jp ([202.215.75.70]:60000 helo=localhost) by hampton.hostforweb.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fOAYB-00ECjE-G2; Wed, 30 May 2018 18:30:40 -0500 X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( Cancel-Lock: sha1:afSsolfmHHk9mIMO7uwi3OmbB94= X-OutGoing-Spam-Status: No, score=-1.0 X-AuthUser: yamaoka@hampton.hostforweb.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:146763 Archived-At: 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))