Subject: bug#13686: closed (Re: bug#13686: 24.3.50; Re-look hi-lock-face-defaults (aka Provide more "core" faces for highlighting))

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 15 Nov 2013 04:47:02 +0000

Your bug report

#13686: 24.3.50; Re-look hi-lock-face-defaults (aka Provide more "core" faces for highlighting)

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
13686: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13686
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#13686: 24.3.50; Re-look hi-lock-face-defaults (aka Provide more "core" faces for highlighting)
From: Jambunathan K <[email-masked]>
To: [email-masked]
Date: Fri, 15 Nov 2013 10:15:55 +0530
List-Id: <debbugs-submit.debbugs.gnu.org>

OP here.  Closed.

Subject: 24.3.50; Re-look hi-lock-face-defaults (aka Provide more "core" faces for highlighting)
From: Jambunathan K <[email-masked]>
To: [email-masked]
Date: Mon, 11 Feb 2013 11:44:28 +0530
List-Id: <debbugs-submit.debbugs.gnu.org>

Spun-off from 
        http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11095

Bug pertains to the variables mentioned below.  (CAUTION: Don't look at
the bug, you will be lost)

,----
| (defvar hi-lock-face-defaults
|   '("hi-yellow" "hi-pink" "hi-green" "hi-blue" "hi-black-b"
|     "hi-blue-b" "hi-red-b" "hi-green-b" "hi-black-hb")
|   "Default faces for hi-lock interactive functions.")
`----

,----
| (defface hi-yellow
|   '((((min-colors 88) (background dark))
|      (:background "yellow1" :foreground "black"))
|     (((background dark)) (:background "yellow" :foreground "black"))
|     (((min-colors 88)) (:background "yellow1"))
|     (t (:background "yellow")))
|   "Default face for hi-lock mode."
|   :group 'hi-lock-faces)
`----

Proposal in Elisp
-----------------

My proposals amounted to this patch and 

        http://debbugs.gnu.org/cgi/bugreport.cgi?msg=8;filename=bug11095-part1.patch;att=1;bug=11095

A variation of above changes from my .emacs.  (WARNING: May contain
irrelevant bits.  Reader discretion advised.)

,----
| 
| (defface hi-lock-1
|   '((t (:background "#ffff00" :foreground "black")))
|   "Face for hi-lock mode."
|   :group 'hi-lock-faces)
| 
| (defface hi-lock-2
|   '((t (:background "#00ff7f" :foreground "black")))
|   "Face for hi-lock mode."
|   :group 'hi-lock-faces)
| 
| 
| (setq hi-lock-face-defaults
|       (mapcar 'face-name
| 	      '(hi-lock-1 hi-lock-2 hi-lock-3 hi-lock-4 hi-lock-5 hi-lock-6
| 			  hi-lock-7 hi-lock-8 hi-lock-9 )))
| 
| (custom-set-variables 
|  '(hi-lock-faces 
|    (quote (hi-lock-1 hi-lock-2 hi-lock-3 hi-lock-4 hi-lock-5
| 		     hi-lock-6 hi-lock-7 hi-lock-8 hi-lock-9))))
`----

Various voices (Stefan, Jambu, Drew)
-----------------------------------

,----
| 1) Review the face names used in `hi-lock-face-defaults' and make the
|    faces customizable.  The defaults may not look good on a user's his
|    own font-lock configuration.
`----

,----
| > > -(defface hi-yellow
| > > +(defface hi-lock-1
| > 
| > I'm not sure it's an improvement.  When choosing a face in
| > hi-lock-face-buffer, "hi-lock-1" doesn't speak much to me contrary to
| > "hi-yellow".
| 
| Not specifically related to this face, but it is a bad idea, in general (no
| doubt there are exceptions), for a face name to advertize particular face
| attributes, such as the color.
| 
| The color is presumably something that the user can customize, and is typically
| not something that speaks to the use or meaning of the face.
`----

,----
| I think the real issue here is that hi-lock should have a customizable
| set of faces rather than a set of customizable faces.
| So if the user doesn't like hi-yellow (which should be called
| hi-lock-yellow, BTW) because she never highlights in yellow, she can
| replace it with her own face with the name she likes.
`----

,----
| 1. I want the name to be opaque and semantic.
| 
| 2. I also want a pre-defined set of faces for highlighting apart from
|    the one "core" highlight face.  I think there are 9 hi-* faces and
|    these numbers are good enough.
| 
|    Think of them as extra colors in my palette.
| 
|    Having a set of highlighting faces will help in theming.  For
|    example, consider finding file in ido-mode.  When I do C-x C-f, I see
|    various faces - the minibuffer prompt, ido-first-match, ido-subdir,
|    ido-indicator all occurring /next/ to each other.  If there are
|    hi-lock-N faces, chosen by a theme designed, one can simply have ido
|    faces inherit from these themed faces.  It is much cleaner.
| 
|    Remember choosing faces that can co-exist in buffer without much
|    trouble to eyes is challenging task - one needs to balance harmony
|    and contrast.  A theme designer is likely to work with a palette and
|    can go with color-picking techniques like triad, tetrad schemes.  See
| 
|         http://colorschemedesigner.com/
|         http://www.w3.org/wiki/Colour_theory
|         http://packages.debian.org/squeeze/agave
| 
|    Triad and tetrads apparently are colors that are 120 and 90 degrees
|    apart in the color wheel.  So if there are N highlighting faces, they
|    can be spaced 360/N degree apart in a color wheeel.
| 
|    Drew's reasoning that it is the N-th highlighting face in a sequence.
| 
| 3. Configuring an yellow face in red is a bit ugly.  It is declaring a
|    variable name FALSE that is assigned a variable value true.
| 
| >> Just why would you prefer a "customizable set of faces" over a "set of
| >> customizable faces"?  And how does that relate to the names?
| >
| > Because the user can then choose the names that make sense to her.
| 
| While reading a face name from minibuffer, if the face name itself is
| highlighted in that face - think rainbow mode - then the name of the
| face shouldn't matter.
| 
| What you are asking for is a constant face whose properties don't change
| at all.  One can have an elpa packages which provides constant faces,
| that are immediately useful.
| 
`----

In GNU Emacs 24.3.50.3 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2013-02-11 on debian-6.05
Bzr revision: 111730 [email-masked]
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
System Description:	Debian GNU/Linux 6.0.5 (squeeze)