Juanma Barranquero <lekktu <at> gmail.com>
to control <at> emacsbugs.donarmstrong.com.
Full text available.Chong Yidong <cyd <at> stupidchicken.com>
to control <at> emacsbugs.donarmstrong.com.
Full text available.
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 <at> emacsbugs.donarmstrong.com>; 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 <at> iro.umontreal.ca>
To: 337 <at> debbugs.gnu.org
Subject: Re: bug#337: vc-diff forget previous point
Message-ID: <jwv4p8bt26f.fsf-monnier+emacsbugreports <at> gnu.org>
References: <E1K2DfH-00016z-5q <at> a4.complang.tuwien.ac.at>
Date: Tue, 03 Jun 2008 03:24:32 -0400
In-Reply-To: <E1K2DfH-00016z-5q <at> a4.complang.tuwien.ac.at> (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
Stefan Monnier <monnier <at> iro.umontreal.ca>:Emacs Bugs <bug-gnu-emacs <at> gnu.org>.
Full text available.bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:bug#337; Package emacs.
Full text available.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 <at> emacsbugs.donarmstrong.com>; 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 <at> gnu.org; 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 <at> gnu.org; 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 <at> gnu.org; 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 <at> complang.tuwien.ac.at>) id 1K2DfQ-0007Gn-Ml for bug-gnu-emacs <at> gnu.org; 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 <at> complang.tuwien.ac.at>) id 1K2DfH-00016z-5q for bug-gnu-emacs <at> gnu.org; Sat, 31 May 2008 01:05:39 +0200 To: bug-gnu-emacs <at> gnu.org Subject: vc-diff forget previous point Message-Id: <E1K2DfH-00016z-5q <at> a4.complang.tuwien.ac.at> From: Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at> 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 <at> 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 ....
Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>:Emacs Bugs <bug-gnu-emacs <at> gnu.org>.
Full text available.bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:bug#337; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.