GNU bug report logs -
#32991
27.0.50; diff-auto-refine-mode a no-op
Previous Next
Reported by: charles <at> aurox.ch
Date: Mon, 8 Oct 2018 18:28:01 UTC
Severity: normal
Tags: fixed
Found in version 27.0.50
Fixed in version 27.1
Done: charles <at> aurox.ch
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> So diff-font-lock-refine could have 3 possible values, t and nil as it
> has now, and 'auto for doing the refinement as you navigate to hunks
> with "n" or "p".
I don't see what the navigation-triggered refinement has of
"auto"matism, compared to font-lock, so I wouldn't use `auto` here.
I'd rather go with something like `nil`, `font-lock`, or `navigation`
(and default to `font-lock`).
> While we're on this point, what is the use case for offering automatic
> refining during navigation if we can now offer "just-in-time"
> highlighting via font-lock?
Good question. Maybe it's just not worth it and we should simply get
rid of the old navigation-triggered refinement. This said, the new
font-lock thingy can be problematic if the diff takes too much time
since it happens within jit-lock with inhibit-quit set to a non-nil
value, so it completely freezes your Emacs session, whereas if it
happens during `n` you can stop it with C-g.
Hopefully, we can fix this problem by calling `diff` asynchronously so
it can't block Emacs.
> It could be even better if C-c C-b could interactively toggle the
> refining of the hunk at point (for those times when the refining turns
> out to be an eye-sore).
Sounds good (but note that diff-refine-hunk can also be useful to
*refresh* the fine highlighting, e.g. after manually editing a hunk).
> Another advantage of the new font-lock based approach is that with a
> little change we might be able to customize how much highlighting is
> done in a diff-mode buffer via "font-lock-maximum-decoration".
font-lock-maximum-decoration is fundamentally flawed in that it is
unidimensional (you can only have more or less) whereas often some users
may want more of one kind of info and less of another.
E.g. how would you order the "decoration levels" between:
basic
basic + refine
basic + prettify
basic + prettify + refine
The first and last are easy, but there's no natural ordering between the
middle two.
Stefan
This bug report was last modified 6 years and 76 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.