unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* diff-mode: C-c C-c fails when location of hunk has been changed. C-d bound to backward-word.
@ 2008-05-26 14:04 Alan Mackenzie
  2008-05-26 15:55 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Mackenzie @ 2008-05-26 14:04 UTC (permalink / raw)
  To: emacs-devel, Stefan Monnier

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-26 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-26 14:04 diff-mode: C-c C-c fails when location of hunk has been changed. C-d bound to backward-word Alan Mackenzie
2008-05-26 15:55 ` Stefan Monnier
2008-05-26 17:29   ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).