unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13686: 24.3.50; Re-look hi-lock-face-defaults (aka Provide more "core" faces for highlighting)
@ 2013-02-11  6:14 Jambunathan K
  2013-02-15 15:03 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 37+ messages in thread
From: Jambunathan K @ 2013-02-11  6:14 UTC (permalink / raw)
  To: 13686


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 rgm@gnu.org-20130211015045-19w1ceor0tkfxc8q
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
System Description:	Debian GNU/Linux 6.0.5 (squeeze)






^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2013-11-15  4:45 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-11  6:14 bug#13686: 24.3.50; Re-look hi-lock-face-defaults (aka Provide more "core" faces for highlighting) Jambunathan K
2013-02-15 15:03 ` Stefan Monnier
2013-02-15 18:29   ` David Koppelman
2013-02-15 20:39     ` Stefan Monnier
2013-02-26 23:11 ` bug#13686: hi-yellow vs. hi-lock-1 David Koppelman
2013-02-27  0:33   ` Drew Adams
2013-02-27  1:35     ` Stefan Monnier
2013-02-27  3:59       ` Jambunathan K
2013-02-27  4:58       ` Drew Adams
2013-02-27  5:10         ` Jambunathan K
2013-02-27  5:38           ` Drew Adams
2013-02-27  5:54             ` Jambunathan K
2013-02-27  6:01               ` Drew Adams
2013-02-27 23:45             ` Juri Linkov
2013-03-06 18:43               ` Jambunathan K
2013-03-06 19:54                 ` David Koppelman
2013-03-07  9:16                 ` Juri Linkov
2013-03-06 19:04             ` Jambunathan K
2013-02-27  3:49     ` Jambunathan K
2013-02-27 13:46       ` Stefan Monnier
2013-02-27 14:56         ` Jambunathan K
2013-02-27 16:27           ` Stefan Monnier
2013-03-06 18:56         ` Jambunathan K
2013-03-06 19:55           ` David Koppelman
2013-03-06 20:06             ` Jambunathan K
2013-03-07  0:54               ` David Koppelman
2013-03-07  3:23                 ` Jambunathan K
2013-03-09  1:33             ` Stefan Monnier
2013-03-09  2:47               ` Jambunathan K
2013-03-09  3:26                 ` Stefan Monnier
2013-04-08  5:31               ` Jambunathan K
2013-04-10  4:11                 ` Jambunathan K
2013-04-10 18:33                 ` David Koppelman
2013-04-11  4:24                   ` Jambunathan K
2013-02-27  3:36   ` Jambunathan K
2013-02-27  4:08   ` Jambunathan K
2013-11-15  4:45 ` bug#13686: 24.3.50; Re-look hi-lock-face-defaults (aka Provide more "core" faces for highlighting) Jambunathan K

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).