From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 23.0.60; diff-apply-hunk new line at end of file Date: Thu, 24 Apr 2008 21:37:46 -0400 Message-ID: References: <20080424232339.93F8382CEF3@mt-computer.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1209087489 14313 80.91.229.12 (25 Apr 2008 01:38:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Apr 2008 01:38:09 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org To: Markus Triska Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 25 03:38:44 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JpCte-0006tI-SI for ged-emacs-devel@m.gmane.org; Fri, 25 Apr 2008 03:38:43 +0200 Original-Received: from localhost ([127.0.0.1]:59843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JpCsy-0007kC-CP for ged-emacs-devel@m.gmane.org; Thu, 24 Apr 2008 21:38:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JpCss-0007h6-2M for emacs-devel@gnu.org; Thu, 24 Apr 2008 21:37:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JpCsq-0007eM-Hu for emacs-devel@gnu.org; Thu, 24 Apr 2008 21:37:53 -0400 Original-Received: from [199.232.76.173] (port=37240 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JpCsq-0007eA-6j for emacs-devel@gnu.org; Thu, 24 Apr 2008 21:37:52 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JpCsp-00061d-VY for emacs-devel@gnu.org; Thu, 24 Apr 2008 21:37:52 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]:33970) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JpCso-000608-Rv for emacs-pretest-bug@gnu.org; Thu, 24 Apr 2008 21:37:50 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JpCsl-00061D-D9 for emacs-pretest-bug@gnu.org; Thu, 24 Apr 2008 21:37:50 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JpCsl-000615-60 for emacs-pretest-bug@gnu.org; Thu, 24 Apr 2008 21:37:47 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Al0CAFHTEEjO+J6adGdsb2JhbACBUpAEASebLA X-IronPort-AV: E=Sophos;i="4.25,706,1199682000"; d="scan'208";a="19054744" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 24 Apr 2008 21:37:46 -0400 Original-Received: from pastel.home ([206.248.158.154]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id FFK54146; Thu, 24 Apr 2008 21:37:46 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 8FCF78064; Thu, 24 Apr 2008 21:37:46 -0400 (EDT) In-Reply-To: <20080424232339.93F8382CEF3@mt-computer.local> (Markus Triska's message of "Fri, 25 Apr 2008 01:23:39 +0200 (CEST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:95927 gmane.emacs.pretest.bugs:22141 Archived-At: > diff --git a/t.txt b/t.txt > index f27f040..27bd94f 100644 > --- a/t.txt > +++ b/t.txt > @@ -1 +1,2 @@ > first line. > + > (available from: http://www.logic.at/prolog/t.patch ) > and, in the same directory, t.txt with the following content: > first line. > (available from: http://www.logic.at/prolog/t.txt ) > and do C-c C-a on the first and only hunk of t.patch, the patch is > applied. When I then do C-c C-a, another new line is unexpectedly > inserted at the end of t.txt. Arbitrarily many, if repeated. Why would that be a bug? The patch doesn't say that it is at the end of the file, so all it says is "add an empty line after the line `first line'". You may argue that the lack of context is an indication that it's meant to be at the end-of-file, but that lack of context may be due to something else. Furthermore, the same kind of problem can happen even with 3-lines of context, such that after applying the patch, the new file's content still contains the pattern required for the patch be applied. Stefan