emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Syntactic fontification of diff hunks


From: Yuri Khan
Subject: Re: Syntactic fontification of diff hunks
Date: Fri, 17 Aug 2018 12:41:10 +0700

On Fri, Aug 17, 2018 at 4:41 AM Juri Linkov <address@hidden> wrote:
>
> Most version control sites like gitlab/github highlight syntax
> in code snippets inside diff hunks, for example:
> https://github.com/magit/magit/pull/2834/commits/95cacde4fcccc95c25d6fb9988d2aa097193f8c0
>
> This is very helpful when looking at code changes.  I missed this feature in 
> Emacs
> for a long time.

Oh yesss.

> Then I realized that much simpler would be just to use the same approach
> implemented by diff-mode refinement, i.e. to take each diff hunk one by
> one, and like the diff refinement highlights more fine-grained changes,
> do the same for syntax highlighting according to the language in
> compared files/commits.

I suppose some integration will be needed before this works in Magit, too?

Also, it looks like it’s going to be somewhere between slightly and
horribly inaccurate depending on where the hunk starts (e.g. in the
middle of a string literal or comment)?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]