dgutov / diff-hl

Emacs package for highlighting uncommitted changes
GNU General Public License v3.0
914 stars 44 forks source link

Show current hunk in posframe #145

Closed alvarogonzalezsotillo closed 3 years ago

alvarogonzalezsotillo commented 4 years ago

I liked the idea explained in https://github.com/dgutov/diff-hl/pull/112

Instead of add diff information to overlays, I used diff-hl-diff-goto-hunk and the *vc-diff* buffer contents. The current hunk is shown in a posframe when clicking in the fringe, if graphics are available, using diff-hl-diff-goto-hunkas a fallback.

screenshot-posframe

I developed this as a new package, but maybe it can be integrated in diff-hl. I think the biggest drawback is the dependency on posframe, but I would like to know your opinion.

dgutov commented 4 years ago

Hi!

First of all, I like the idea, but keeping it a separate package would be totally fine by me. It doesn't look like it is likely to break with any future updates.

If you like to contribute it, though, here are the issues I'm slightly concerned with:

Finally, this package is part of GNU ELPA, so to accept a contribution like this I'll have to ask you to complete copyright assignment to FSF. Would you be willing to do that?

alvarogonzalezsotillo commented 3 years ago

I like the idea of a more general diff-hl-show-hunk-mode, with a customizable diff-hl-show-hunk-function.

I am refactoring the code to allow posframe and popup. It is a big task for me, since I am not experienced in emacs lisp, and I had no clue about posframe or popup. I will close this PR and I will open a new one when I have a working package (work in progress in its own repository)

I will complete a copyright assignment to FSF then.

dgutov commented 3 years ago

Very good. Thanks!

Feel free to ask questions, if you ever need some advice.