From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: About the :distant-foreground face attribute Date: Thu, 09 Jan 2014 19:05:28 +0200 Message-ID: <83zjn5cch3.fsf@gnu.org> References: <87bnzo9cja.fsf@gnu.org> <59B7E7FC-48D0-4737-B1BB-FFAC5BA9E07A@swipnet.se> <874n5f3162.fsf@gnu.org> <83fvozf86g.fsf@gnu.org> <87r48javwe.fsf@gnu.org> <83bnzmfjxe.fsf@gnu.org> <87bnzlyvwb.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1389287154 28709 80.91.229.3 (9 Jan 2014 17:05:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Jan 2014 17:05:54 +0000 (UTC) Cc: jan.h.d@swipnet.se, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 09 18:05:58 2014 Return-path: Envelope-to: ged-emacs-devel@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 1W1J3J-00064N-NT for ged-emacs-devel@m.gmane.org; Thu, 09 Jan 2014 18:05:53 +0100 Original-Received: from localhost ([::1]:53175 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1J3J-0008Eh-8U for ged-emacs-devel@m.gmane.org; Thu, 09 Jan 2014 12:05:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1J3A-0008BJ-US for emacs-devel@gnu.org; Thu, 09 Jan 2014 12:05:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1J35-0007IB-KY for emacs-devel@gnu.org; Thu, 09 Jan 2014 12:05:44 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:34091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1J2y-0007Gw-Vs; Thu, 09 Jan 2014 12:05:33 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MZ5009008OQZK00@a-mtaout20.012.net.il>; Thu, 09 Jan 2014 19:05:31 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MZ5009WL8T6TC50@a-mtaout20.012.net.il>; Thu, 09 Jan 2014 19:05:31 +0200 (IST) In-reply-to: <87bnzlyvwb.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:167942 Archived-At: > From: Chong Yidong > Cc: jan.h.d@swipnet.se, emacs-devel@gnu.org > Date: Fri, 10 Jan 2014 00:15:00 +0800 > > Eli Zaretskii writes: > > >> The analogy would be if there was a :low-color-foreground face attribute > >> which would override :foreground on low-color displays. That would be > >> ugly, as I hope you agree. > > > > I'm not sure I see the ugliness, please elaborate. > > One face attribute should govern one aspect of how the face is > displayed. In some cases, it may be hard to avoid having multiple > attributes with overlapping effects, but the results are not pretty. > For example, the interactions between :family, :foundry and :font have > been a source of annoyance over the years. Introducing another such > situation should, in my view, be avoided as far as possible. > > An example of a face attribute that handles things right is the :height > attribute. An absolute height is given by an integer, while a relative > height can be specified by a float. Allowing both in a single attribute > is good, because absolute height and the relative height are just > different ways to specify height. We don't have a :height and a > separate :relative-height attribute. If you are arguing for a change in the syntax of :foreground such that it could convey the information about both the "normal" color, and the alternate color to be used when the background is too similar to that "normal" color, then I agree it will probably be a nicer and cleaner feature. But that means :foreground will no longer be a simple string, but some more complex data structure, e.g. a list. > If I cannot convince anyone that there is a problem here, then forget > it. Don't give up just yet ;-) The solution should be able to cope with the need to dynamically decide which color is used as a foreground, based on the current background. It also needs to support the possibility that a face will want to force use of a specific fixed foreground color, regardless of the background. (Jan, did I miss some additional requirements?) If you can propose a cleaner solution that satisfies these requirements, please do, and let's discuss that.