GNU bug report logs - #337
vc-diff forget previous point

Previous Next

Package: emacs;

Reported by: Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>

Date: Fri, 30 May 2008 23:15:03 UTC

Severity: wishlist

Merged with 28852

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 337 <at> debbugs.gnu.org
Subject: bug#337: vc-diff forget previous point
Date: Tue, 03 Jun 2008 03:24:32 -0400
> With a file under version control, I do C-x v = (vc-diff) to walk
> through and resolve differences.  Since there are many, I re-issue
> vc-diff to see the remaining differences.  Unfortunately, vc-diff
> forgets the previous point in buffer *vc-diff* resetting point to 0.
> My expectation would be that the cursor remains where it has been (not
> the literal point but the corresponding part to the same source line).

> Maybe something similar to C-c C-c (diff-goto-source) but in the other
> direction would be useful in general.

Indeed.  Dan had a patch to do just that, but it was never applied and
it doesn't work any more, AFAICT.

I never applied his patch because it wasn't doing quite the right thing.
I think "The Right Thing" is to first look for the part of the diff that
refers to the current file (in case the diff includes several files),
and then within it, use a binary search with `diff-goto-source' to
figure out the position in the diff buffer that jumps closest to point.
This way, if point is within a part of the buffer where a hunk applies,
the function should be able to find the exact character position
corresponding to point, just like diff-goto-source does in the
other direction.

Patch welcome,


        Stefan




This bug report was last modified 3 years and 111 days ago.

Previous Next


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