From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Re: About the :distant-foreground face attribute Date: Mon, 13 Jan 2014 20:45:03 -0500 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> <52D3E689.6050902@dancol.org> <8E16225F-53EF-498A-AB35-66EB9B33B859@swipnet.se> <52D43360.6050605@dancol.org> <9BD01B88-AF13-44DD-8DBE-4598BAC136DD@swipnet.se> <52D45C73.6090906@dancol.org> <52D47FD5.6060402@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389663938 31034 80.91.229.3 (14 Jan 2014 01:45:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jan 2014 01:45:38 +0000 (UTC) Cc: Eli Zaretskii , Jan =?windows-1252?Q?Dj=E4rv?= , Chong Yidong , emacs-devel To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 14 02:45:43 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 1W2t4Z-0004YC-Hg for ged-emacs-devel@m.gmane.org; Tue, 14 Jan 2014 02:45:43 +0100 Original-Received: from localhost ([::1]:45980 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2t4Y-0003Hw-Um for ged-emacs-devel@m.gmane.org; Mon, 13 Jan 2014 20:45:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2t4L-0003DD-BM for emacs-devel@gnu.org; Mon, 13 Jan 2014 20:45:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2t4E-0005K5-1F for emacs-devel@gnu.org; Mon, 13 Jan 2014 20:45:29 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:21514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2t3w-00058t-Vp; Mon, 13 Jan 2014 20:45:05 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCoyj/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAsOJhIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IPAS-Result: Av4EABK/CFFMCoyj/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAsOJhIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="44871304" Original-Received: from 76-10-140-163.dsl.teksavvy.com (HELO pastel.home) ([76.10.140.163]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 13 Jan 2014 20:45:03 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id A9D5C612B0; Mon, 13 Jan 2014 20:45:03 -0500 (EST) In-Reply-To: <52D47FD5.6060402@dancol.org> (Daniel Colascione's message of "Mon, 13 Jan 2014 16:07:49 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:168335 Archived-At: >>> If you want the :distant-foreground behavior, it can be accommodated >>> in this patch. This patch also permits other schemes that some users >>> might find more useful. We should push policy to user customization >>> when possible instead of hardcoding policy in the logic of >>> face attributes. >> FWIW, I like the idea of being able to compute the color dynamically. >> I also would welcome a way to specify "color filters", e.g. a face which >> "darkens the foreground color". IOW the equivalent of the >> floating-point :height settings, but for colors. > You can write something like that in my setup --- we actually > call :contrast-function on every face realization. There's no reason it has > to act only on certain conditions, although that's what all the existing > implementations do. There are some differences, tho, w.r.t what the function sees: does it see the fully merged face, or does it only see the face merged up to the point where the filter appears. The point of :distant-foreground is that it looks at the fully merged face, whereas the floating-point :height settings apply to the face merged up to the point where that :height appears. The difference is that "higher up" attributes can still override the result. Both behaviors make sense in different circumstances. Stefan