bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#13686: hi-yellow vs. hi-lock-1


From: Jambunathan K
Subject: bug#13686: hi-yellow vs. hi-lock-1
Date: Wed, 27 Feb 2013 09:06:02 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

David Koppelman <koppel@ece.lsu.edu> writes:

> As the original developer of hi-lock and one willing to continue
> maintaining it, let me add my voice:
>
> I feel that a face name like hi-lock-1 would be much less useful, even
> if the name itself were rendered with the highlighting. The user's
> goal is to highlight something, currently the user can go through
> face choices until he or she finds a suitable color (if the first one
> does not satisfy). A cryptic name like hi-lock-1 just puts irrelevant
> information in front of the user, assuming the name is highlighted
> with the color.

New option `hi-lock-auto-select-face' makes selection of faces
redundant.  So with auto-selection on, one doesn't even have to pick.
One merely gets on with one's business of making sense of code/text at
hand.

Here is my original use-case

,---- http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11095
|
| 2) Make `hi-lock-face-buffer' use a different face on each invocation.  
| 
|    Here is a real-world usecase for the above request.
| 
|    As a programmer, I use highlighting to trace variable dependencies
|    within a function.  For example, in the example below, after
|    highlighting the variables in __different__ faces, I will come to the
|    conclusion that "a" depends on "d" and "tmp".
| 
|      c = d;
|      b = c + tmp;
|      a = b;
| 
|    And I use this very often to track variables and how they get their
|    values from.
| 
|    If I were to use the default Emacs provided behaviour then I would
|    have to press M-n multiple times as I highlight more and more
|    symbols. (Typically I have 3-5 symbols highlighted before I turn off
|    highlighting.)
|
`----

> A name like font-lock-comment-face is semantic because it indicates
> the purpose of the face.  The purpose of hi-yellow is to highlight
> something in yellow, so in that sense the name is semantic.

In would consider `hi-yellow' a "constant" face.  I am not questioning
the usefulness or rationale of original choice - I am convinced that it
is useful.  

I am merely presenting one another use-case.  We can have both constant
faces and themable faces.  IIRC, my original patch defaliased the
hi-yellow to hi-lock-1.

> If themers felt a strong need, we could make hi-lock-face-defaults
> themable so that hi-yellow and hi-green say, could be replaced with
> hi-golden-honey and hi-grassy-green. (Or the original face names with
> slightly different tints.)

This seems like a half-hearted attempt at theming.

Remember, `highlight' face which is one of the "core" faces.  My
suggestion could be considered as a case for augmenting the highlighting
faces with more numbers and have someone who is "visually adept" choose
good defaults.

The need for theming - that is multiple highlighting faces to *co-exist
simulataneously* in one's buffer - is very important.  When I have 3-4
highlights in my buffer (using the current defaults) my eye hurts.

Bottomline: It is not an "one-or-the-other" proposal.  Let's have best
of both worlds.
-- 





reply via email to

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