emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

diff-mode: C-c C-c fails when location of hunk has been changed. C-d bou


From: Alan Mackenzie
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
User-agent: Mutt/1.5.9i

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).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]