unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: emacs-devel@gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
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	[thread overview]
Message-ID: <20080526140422.GC4758@muc.de> (raw)

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	other threads:[~2008-05-26 14:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-26 14:04 Alan Mackenzie [this message]
2008-05-26 15:55 ` diff-mode: C-c C-c fails when location of hunk has been changed. C-d bound to backward-word Stefan Monnier
2008-05-26 17:29   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080526140422.GC4758@muc.de \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).