From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: diff-mode: C-c C-c fails when location of hunk has been changed. C-d bound to backward-word. Date: Mon, 26 May 2008 14:04:22 +0000 Message-ID: <20080526140422.GC4758@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1211809463 3886 80.91.229.12 (26 May 2008 13:44:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 May 2008 13:44:23 +0000 (UTC) To: emacs-devel@gnu.org, Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 26 15:44:54 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 1K0d0J-00011x-Bt for ged-emacs-devel@m.gmane.org; Mon, 26 May 2008 15:44:47 +0200 Original-Received: from localhost ([127.0.0.1]:43547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K0czY-0003xp-Cz for ged-emacs-devel@m.gmane.org; Mon, 26 May 2008 09:44:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K0czO-0003vA-7A for emacs-devel@gnu.org; Mon, 26 May 2008 09:43:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K0czM-0003uS-QZ for emacs-devel@gnu.org; Mon, 26 May 2008 09:43:49 -0400 Original-Received: from [199.232.76.173] (port=44594 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K0czM-0003uL-GO for emacs-devel@gnu.org; Mon, 26 May 2008 09:43:48 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:3269 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K0czM-0008PR-8e for emacs-devel@gnu.org; Mon, 26 May 2008 09:43:48 -0400 Original-Received: (qmail 20694 invoked by uid 3782); 26 May 2008 13:43:45 -0000 Original-Received: from acm.muc.de (pD9E529E3.dip.t-dialin.net [217.229.41.227]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Mon, 26 May 2008 15:43:40 +0200 Original-Received: (qmail 6243 invoked by uid 1000); 26 May 2008 14:04:22 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 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:97719 Archived-At: Hi, Stefan and Emacs! GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2008-04-22 on acm In diff mode, whilst on a hunk, do C-c C-c. This fails to find the changed text in the target buffer, because it is now too far away from where it was. Fair enough. Now edit the diff hunk so that the line number is now correct. I.e., change: *** 2078,2084 **** to *** 2128,2134 **** . Now do C-c C-c again. Point is left at L2078 in the target buffer, not L2128. THIS IS A BUG. ######################################################################### Whilst in the diff mode buffer, type C-d here: *** 2078,2084 **** ^ The apparent effect of this is backward-word. This is unfriendly. (What actually happens is that an after-command hook recalculates 2084 and splats it into position.) I think it would be better if diff-mode beeped with a message, e.g. "End of hunk line-number cannot be edited". -- Alan Mackenzie (Nuremberg, Germany).