GNU bug report logs - #36526
26.2; Open diff at current location (feature request with suggested code)

Previous Next

Package: emacs;

Reported by: Campbell Barton <ideasman42 <at> gmail.com>

Date: Sat, 6 Jul 2019 13:09:01 UTC

Severity: wishlist

Merged with 51215

Found in version 26.2

Full log


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

From: Campbell Barton <ideasman42 <at> gmail.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 36526 <at> debbugs.gnu.org
Subject: Re: bug#36526: 26.2; Open diff at current location (feature request
 with suggested code)
Date: Wed, 06 Nov 2019 22:15:19 +1100
On Sat, 2019-11-02 at 02:02 +0100, Stefan Kangas wrote:
> Stefan Kangas <stefan <at> marxist.se> writes:
> 
> >> Would someone be able to check the code and see if it's going in
> the
> >> right direction?
> >
> > OK, but see below.
> >
> >> >> This is a feature suggestion which I've written example code
> for
> >> >>
> >> >> `vc-root-diff` (or a new function), could jump to the closest
> line.
> >> >>
> >> >> This is useful since you move to the context of the current
> line.
> >
> > I'm not sure I understand what this code is supposed to do or how
> to
> > use it. Could you please give a recipe for how to test it?
> 
> Hi Campbell,
> 
> Just to follow up on this, could you please provide instructions for
> how to test your patch?
> 
> Thanks in advance.
> 
> Best regards,
> Stefan Kangas


Hi Stefan,

I've updated the Q&A to include the code and a utility function to use
it:

https://emacs.stackexchange.com/a/51439/2418

Try binding "vc-root-diff-fullscreen-and-jump-to-point" from a key in a
git repository with local edits, this will open the diff at (or close
to) the location being edited.

Included example video, showing how this is useful:

https://youtu.be/hbD8WrtWfEg





This bug report was last modified 100 days ago.

Previous Next


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