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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Ulrich Neumerkel <ulrich@HIDDEN>; Keywords: patch; dated Fri, 30 May 2008 23:15:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Disconnected #28852 from all other report(s). Request was from charles@HIDDEN (Charles A. Roelli) to control <at> debbugs.gnu.org. Full text available.
Merged 337 28852. Request was from charles@HIDDEN (Charles A. Roelli) to control <at> debbugs.gnu.org. Full text available.
bug reassigned from package `emacs' to `emacs,vc'. Request was from Juanma Barranquero <lekktu@HIDDEN> to control@HIDDEN. Full text available.
Severity set to `wishlist' from `normal' Request was from Chong Yidong <cyd@HIDDEN> to control@HIDDEN. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-1.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	HELO_LH_HOME,MURPHY_DRUGS_REL8,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=no
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 337) by emacsbugs.donarmstrong.com; 3 Jun 2008 07:24:35 +0000
Received: from ceviche.home (206-248-132-168.dsl.teksavvy.com [206.248.132.168])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m537OWda027252
	for <337@HIDDEN>; Tue, 3 Jun 2008 00:24:33 -0700
Received: by ceviche.home (Postfix, from userid 20848)
	id 3E671B423C; Tue,  3 Jun 2008 03:24:32 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: 337 <at> debbugs.gnu.org
Subject: Re: bug#337: vc-diff forget previous point
Message-ID: <jwv4p8bt26f.fsf-monnier+emacsbugreports@HIDDEN>
References: <E1K2DfH-00016z-5q@HIDDEN>
Date: Tue, 03 Jun 2008 03:24:32 -0400
In-Reply-To: <E1K2DfH-00016z-5q@HIDDEN> (Ulrich Neumerkel's
	message of "Sat, 31 May 2008 01:05:39 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

> 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




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#337; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.0 required=4.0 tests=AWL,BAYES_00,
	RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 30 May 2008 23:05:55 +0000
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4UN5pxZ009675
	for <submit@HIDDEN>; Fri, 30 May 2008 16:05:53 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1K2DfT-0002CB-78
	for bug-gnu-emacs@HIDDEN; Fri, 30 May 2008 19:05:51 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1K2DfR-0002Bx-Jc
	for bug-gnu-emacs@HIDDEN; Fri, 30 May 2008 19:05:49 -0400
Received: from [199.232.76.173] (port=36624 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1K2DfR-0002Bu-DA
	for bug-gnu-emacs@HIDDEN; Fri, 30 May 2008 19:05:49 -0400
Received: from a4.complang.tuwien.ac.at ([128.130.173.65]:60812)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <ulrich@HIDDEN>)
	id 1K2DfQ-0007Gn-Ml
	for bug-gnu-emacs@HIDDEN; Fri, 30 May 2008 19:05:48 -0400
Received: from ulrich by a4.complang.tuwien.ac.at with local (Exim 4.63)
	(envelope-from <ulrich@HIDDEN>)
	id 1K2DfH-00016z-5q
	for bug-gnu-emacs@HIDDEN; Sat, 31 May 2008 01:05:39 +0200
To: bug-gnu-emacs@HIDDEN
Subject: vc-diff forget previous point
Message-Id: <E1K2DfH-00016z-5q@HIDDEN>
From: Ulrich Neumerkel <ulrich@HIDDEN>
Date: Sat, 31 May 2008 01:05:39 +0200
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3)

--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@HIDDEN 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

....





Acknowledgement sent to Ulrich Neumerkel <ulrich@HIDDEN>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#337; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 17 Jul 2018 20:15:02 UTC

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