From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: About the :distant-foreground face attribute Date: Wed, 8 Jan 2014 17:37:42 +0100 Message-ID: References: <87bnzo9cja.fsf@gnu.org> <59B7E7FC-48D0-4737-B1BB-FFAC5BA9E07A@swipnet.se> <874n5f3162.fsf@gnu.org> <83fvozf86g.fsf@gnu.org> <87r48javwe.fsf@gnu.org> <5AAF847C-97BF-4BB6-A0A6-CAE665D7523E@swipnet.se> <87fvoy7qcp.fsf@gnu.org> <874n5ebka3.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1389199099 30627 80.91.229.3 (8 Jan 2014 16:38:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jan 2014 16:38:19 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 08 17:38:23 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 1W0w95-0005NV-JD for ged-emacs-devel@m.gmane.org; Wed, 08 Jan 2014 17:38:19 +0100 Original-Received: from localhost ([::1]:47732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0w95-0001oa-6Y for ged-emacs-devel@m.gmane.org; Wed, 08 Jan 2014 11:38:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0w8u-0001eH-Ks for emacs-devel@gnu.org; Wed, 08 Jan 2014 11:38:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0w8n-0002OF-A1 for emacs-devel@gnu.org; Wed, 08 Jan 2014 11:38:08 -0500 Original-Received: from mailfe09.tele2.se ([212.247.155.1]:42643 helo=swip.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0w8e-0002LQ-Ka; Wed, 08 Jan 2014 11:37:52 -0500 X-T2-Spam-Status: No, hits=0.0 required=5.0 Original-Received: from hosdjarv.se (account mj138573@tele2.se [46.59.42.57] verified) by mailfe09.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 293579006; Wed, 08 Jan 2014 17:37:44 +0100 In-Reply-To: <874n5ebka3.fsf@gnu.org> X-Mailer: Apple Mail (2.1827) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 212.247.155.1 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:167747 Archived-At: Hi. 8 jan 2014 kl. 15:49 skrev Chong Yidong : > So if you care about obeying gtk_selection_fg_color, why not just set = it > to :foreground? When gtk_selection_bg_color is in use, we might as = well > use gtk_selection_fg_color with it. Users who want a region = background > color that works properly with font lock might as well disable the GTK > selection color stuff (it's unfortunate that it's the default, but oh > well). You obviously don't understand the issue, so I'll try to be very clear. 1) Font lock uses faces with specified fore- and background. 2) When text is marked with the mouse, the region face is applied on = (overrides) the font lock face. 3) If the region face blindly uses the foreground from the region face = (as per your suggestion), for example gtk_selection_fg_color, font lock = is lost. That is what bug 15668 is about. 4) On the other hand, if we always ignore the region foreground color, = and use the font lock foregrpund color bug 15668 would be solved. = However, if the font lock foreground and the region background is = similar, text is not readable. So in that case, distant-foreground is = used. 5) When making a theme, I suspect one wishes to specify all colors, not = use some arbitrary generated color, which most certainly don't match the = theme. So we need a way to specify that color, hence = distant-foreground. Your proposals: 1) Use the selection foreground color when the selection background is = used =3D> Bug 15668. 2) Disable GTK selection color stuff This might lead to unreadable text as the region bacground may be close = to the foreground. There is no "region background color that works properly with font lock" = for all font lock faces, because the colors in font lock faces are = unknown, esp. with themes. If you can get your scheme to let theme designers specify all colors = without adding a new face parameter, via the display property somehow, = that could be something. Not that it would make anything simpler or a = better design, it just sounds more involved to me. Using generated = colors is right out IMHO, it makes themes impossible to fully specify. Jan D.