GNU bug report logs - #19161
24.4; vc-mode reload on commit - don't jump to start of buffer

Previous Next

Package: emacs;

Reported by: Ed Avis <eda <at> waniasset.com>

Date: Mon, 24 Nov 2014 11:34:01 UTC

Severity: normal

Merged with 19380

Found in version 24.4

Fixed in version 25.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 19161 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Ed Avis <eda <at> waniasset.com>
Cc: "'19161 <at> debbugs.gnu.org'" <19161 <at> debbugs.gnu.org>
Subject: Re: bug#19161: 24.4;
 vc-mode reload on commit - don't jump to start of buffer
Date: Wed, 26 Nov 2014 22:28:47 -0500
> It does appear to be moving point to the Id: dropping after commit.
> I just saw this behaviour again - let me have another go at making
> a recipe from emacs -Q.

I think it's probably expected behavior:

When a file is reverted, the file is compared to the buffer and only the
part between the first and the last changed bytes is replaced.

So, in your case, the "first changed byte" is at the "$Id" thingy, and
if the last changed byte is somewhere further down in the middle of the
file (or worse, near the end), then any marker (including "the point",
and window-points) will be moved to either right before or right after
the replaced text.

We could do better, by doing an actual "diff" and then applying the
patch, but someone would have to write it.


        Stefan




This bug report was last modified 10 years and 163 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.