From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.bugs Subject: bug#13686: 24.3.50; Re-look hi-lock-face-defaults (aka Provide more "core" faces for highlighting) Date: Mon, 11 Feb 2013 11:44:28 +0530 Message-ID: <878v6vidh7.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1360563348 13429 80.91.229.3 (11 Feb 2013 06:15:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Feb 2013 06:15:48 +0000 (UTC) To: 13686@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 11 07:16:09 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U4mgT-00080t-EV for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Feb 2013 07:16:09 +0100 Original-Received: from localhost ([::1]:56264 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4mgA-0008Op-2P for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Feb 2013 01:15:50 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4mg6-0008OU-LJ for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2013 01:15:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U4mg4-0000w4-Eh for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2013 01:15:46 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4mg4-0000vy-7x for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2013 01:15:44 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U4mgM-0004YB-AY for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2013 01:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jambunathan K Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Feb 2013 06:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13686 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.136056332617442 (code B ref -1); Mon, 11 Feb 2013 06:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Feb 2013 06:15:26 +0000 Original-Received: from localhost ([127.0.0.1]:49700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U4mfl-0004XG-60 for submit@debbugs.gnu.org; Mon, 11 Feb 2013 01:15:26 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56943) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U4mfh-0004X7-29 for submit@debbugs.gnu.org; Mon, 11 Feb 2013 01:15:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U4mfM-0000WS-MV for submit@debbugs.gnu.org; Mon, 11 Feb 2013 01:15:02 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:37589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4mfM-0000WO-Cd for submit@debbugs.gnu.org; Mon, 11 Feb 2013 01:15:00 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4mfK-0008D8-J2 for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2013 01:15:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U4mfI-0000Vv-P9 for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2013 01:14:58 -0500 Original-Received: from mail-pa0-f49.google.com ([209.85.220.49]:52329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4mfI-0000Vi-ED for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2013 01:14:56 -0500 Original-Received: by mail-pa0-f49.google.com with SMTP id kp6so2946859pab.8 for ; Sun, 10 Feb 2013 22:14:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:date:message-id:mime-version :content-type; bh=pSk46aDuoMTbHv/Po/jrtf9Je5zMruyb0gl6VstpA00=; b=ieKGEn9oVJNBh4O/fR+ZZ+jTXQuP9hnYsY613QJuLLGVD2RV1vj+NR5wVBZ7/PzTlq 8eI3oc854Cz2IgY94MbmBBKnM3aJwBcmNpOathRj9n3HHedVFrmgy+AM5JI+j0b3lohF G/WMGpcCjh8gcjbFDXXb4pYHfeSYwlDWpESiGuN4Bqxqp60rhMjnLQgx9YTfR5hwGddd lFzvRT1hFix7Ru6tbplH7hfSmdD6pG/e9hFnkzAsjHybD/qou9pnKsYRI8wg9ndF9UlR O0OdBDRyrJ+tk8sGVa/xO5hvqfKGipspRBeKtHNyl+oL/OHaEBxEakD0kCWw6lEsfdaj 4paw== X-Received: by 10.66.226.71 with SMTP id rq7mr21460821pac.80.1360563294797; Sun, 10 Feb 2013 22:14:54 -0800 (PST) Original-Received: from debian-6.05 ([115.241.62.28]) by mx.google.com with ESMTPS id it8sm6633028pbc.9.2013.02.10.22.14.51 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Sun, 10 Feb 2013 22:14:54 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:71042 Archived-At: 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)