From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: About the :distant-foreground face attribute Date: Thu, 9 Jan 2014 14:25:09 -0800 (PST) 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> <83bnzmfjxe.fsf@gnu.org> <87bnzlyvwb.fsf@gnu.org> <83wqi9cakl.fsf@gnu.org> <87zjn5584t.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1389306347 5262 80.91.229.3 (9 Jan 2014 22:25:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Jan 2014 22:25:47 +0000 (UTC) Cc: jan.h.d@swipnet.se, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Chong Yidong , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 09 23:25:53 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 1W1O2x-0008S2-IW for ged-emacs-devel@m.gmane.org; Thu, 09 Jan 2014 23:25:51 +0100 Original-Received: from localhost ([::1]:54466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1O2x-0002o6-66 for ged-emacs-devel@m.gmane.org; Thu, 09 Jan 2014 17:25:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1O2f-0002kV-Cn for emacs-devel@gnu.org; Thu, 09 Jan 2014 17:25:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1O2W-0006CD-Qi for emacs-devel@gnu.org; Thu, 09 Jan 2014 17:25:33 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:22762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1O2N-0006AD-PL; Thu, 09 Jan 2014 17:25:15 -0500 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id s09MPEGf009510 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 9 Jan 2014 22:25:15 GMT Original-Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s09MPBWG007404 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 9 Jan 2014 22:25:11 GMT Original-Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id s09MPAat000306; Thu, 9 Jan 2014 22:25:10 GMT In-Reply-To: <87zjn5584t.fsf@gnu.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 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:167987 Archived-At: > >> Please don't. That too would break code that expects :foreground > >> to be as it is now. > > > > Why do you assume that the previous form will not be accepted? Of > > course, it will be. >=20 > What Drew is worrying about, I think, is that third-party code, or > old versions of Emacs, will barf when they come across the new > :foreground form in user customizations or themes. Yes, that is exactly what motivated my reply there. But that is not the main point I argue. The main point is that this feature is misguided. A selection (e.g. Emacs region) highlight _should_ override other highlighting. You need to be able to see clearly which text has been selected, each and every character. IIUC, this enhancement request came about because some platforms impose default region backgrounds that are inappropriate, being the same as or too close to the default foreground. My answer to that would be: (a) not Emacs's problem (a la Eli) - lobby the platform, (b) too bad, (c) let the user customize face `region' to get a better background. Users can define both the foreground and background of face `region'. It should be trivial to do that so there is no conflict and all text selected is easily readable. End of story, no? Why is it "necessary" that font lock highlighting show through the text selection (region)? Answer: it's not. It's not only not necessary (YAGNI), but it is wrong (misguided). The selection _should_ take precedence. > I don't know whether this would be a major problem in practice. > Personally, I agree with David Engster that >=20 > If you really really want font-lock on a marked region, then you > will have to choose a region background which will play well with > your color theme. Introducing a new face attribute for such a small > annoyance looks like overkill to me. >=20 > But IF people feel really strongly about having this feature, doing > it by adding a new :foreground type seems like the least bad option, > from a code cleanliness perspective. It is backward incompatible. It solves a non-problem. It imposes unconventional, unexpected, confusing UI interaction that can reduce a user's ability to tell just which characters have been selected. Not a bug.