[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36526: 26.2; Open diff at current location (feature request with sug
From: |
Campbell Barton |
Subject: |
bug#36526: 26.2; Open diff at current location (feature request with suggested code) |
Date: |
Wed, 06 Nov 2019 22:15:19 +1100 |
User-agent: |
Evolution 3.34.1 |
On Sat, 2019-11-02 at 02:02 +0100, Stefan Kangas wrote:
> Stefan Kangas <stefan@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