From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: diff-mode reports offsets incorrectly Date: Wed, 6 Feb 2008 10:03:33 +1300 Message-ID: <18344.53029.692968.15488@kahikatea.snap.net.nz> References: <18343.61012.833788.163974@kahikatea.snap.net.nz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1202245440 29525 80.91.229.12 (5 Feb 2008 21:04:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Feb 2008 21:04:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 05 22:04:21 2008 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 1JMUxg-0004wv-Ih for ged-emacs-devel@m.gmane.org; Tue, 05 Feb 2008 22:04:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMUxC-0006re-W0 for ged-emacs-devel@m.gmane.org; Tue, 05 Feb 2008 16:03:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JMUx9-0006rR-UI for emacs-devel@gnu.org; Tue, 05 Feb 2008 16:03:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JMUx8-0006r6-C3 for emacs-devel@gnu.org; Tue, 05 Feb 2008 16:03:39 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMUx8-0006qx-7V for emacs-devel@gnu.org; Tue, 05 Feb 2008 16:03:38 -0500 Original-Received: from viper.snap.net.nz ([202.37.101.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JMUx7-000417-SG for emacs-devel@gnu.org; Tue, 05 Feb 2008 16:03:38 -0500 Original-Received: from kahikatea.snap.net.nz (109.31.255.123.static.snap.net.nz [123.255.31.109]) by viper.snap.net.nz (Postfix) with ESMTP id C86813DA0D7; Wed, 6 Feb 2008 10:03:34 +1300 (NZDT) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 5078D8FC6D; Wed, 6 Feb 2008 10:03:34 +1300 (NZDT) In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.1.50.23 X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:88305 Archived-At: > > This didn't happen in Emacs 21.4, but happens in EMACS_22_BASE and trunk. > > I don't know about Emacs 22.1 > > Are you sure this changed? I tried it once and it appeared to be the case. It's quite easy to test: 1) Visit a file under CVS control. 2) Remove a couple of lines in a couple of places and save it. 3) Do cvs-diff, C-x v =, and save the diff-buffer. 4) Revert the file, C-x v u. 5) Apply the hunks from the diff buffer but don't save them. Hunks after the first report an offset. 6) If you have Emacs 21, just do 5) No offsets are reported. > I can't remember changing anything in > this area. Not that it's terribly important since hunk can be applied > in any order (and don't need to all be applied), so offsets are > a completely normal occurrence. I agree that offsets aren't really important but they suggest to me that the file to which the patch is being applied is a bit different to the one from which it was created. It just seems tidy to not report offsets in such cases, in the same way that "patch