all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#337: vc-diff forget previous point
@ 2008-05-30 23:05 Ulrich Neumerkel
  2008-06-03  7:24 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Neumerkel @ 2008-05-30 23:05 UTC (permalink / raw)
  To: bug-gnu-emacs

--text follows this line--

Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

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.

In GNU Emacs 22.2.1 (i686-pc-linux-gnu, X toolkit)
 of 2008-05-28 on gupu.complang.tuwien.ac.at

....







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

* bug#337: vc-diff forget previous point
  2008-05-30 23:05 bug#337: vc-diff forget previous point Ulrich Neumerkel
@ 2008-06-03  7:24 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2008-06-03  7:24 UTC (permalink / raw)
  To: 337

> 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






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

end of thread, other threads:[~2008-06-03  7:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-30 23:05 bug#337: vc-diff forget previous point Ulrich Neumerkel
2008-06-03  7:24 ` Stefan Monnier

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.