From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Fwd: overlay face property not used for after-string property Date: Mon, 05 Nov 2007 17:53:24 +0100 Message-ID: <86wsswhbwb.fsf@lola.quinscape.zz> References: <86r6jfz3bb.fsf@macs.hw.ac.uk> <86bqaixmxk.fsf@macs.hw.ac.uk> <86bqabjozh.fsf@macs.hw.ac.uk> <86y7ddipg5.fsf_-_@macs.hw.ac.uk> <86zlxtdopx.fsf@lola.quinscape.zz> <86d4uolonb.fsf@lola.quinscape.zz> <867ikwhcqi.fsf@macs.hw.ac.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1194281626 6011 80.91.229.12 (5 Nov 2007 16:53:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Nov 2007 16:53:46 +0000 (UTC) Cc: emacs-devel@gnu.org, Stefan Monnier , rms@gnu.org To: Joe Wells Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 05 17:53:47 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ip5Cs-0003oo-Cz for ged-emacs-devel@m.gmane.org; Mon, 05 Nov 2007 17:53:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ip5Ch-0008UO-KU for ged-emacs-devel@m.gmane.org; Mon, 05 Nov 2007 11:53:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ip5Cd-0008Sw-MV for emacs-devel@gnu.org; Mon, 05 Nov 2007 11:53:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ip5CZ-0008NU-HG for emacs-devel@gnu.org; Mon, 05 Nov 2007 11:53:31 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ip5CZ-0008NE-Bx for emacs-devel@gnu.org; Mon, 05 Nov 2007 11:53:27 -0500 Original-Received: from pc3.berlin.powerweb.de ([62.67.228.11]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ip5CY-0000xO-ME for emacs-devel@gnu.org; Mon, 05 Nov 2007 11:53:27 -0500 Original-Received: from quinscape.de (dslnet.212-29-44.ip210.dokom.de [212.29.44.210] (may be forged)) by pc3.berlin.powerweb.de (8.9.3p3/8.9.3) with ESMTP id RAA18219 for ; Mon, 5 Nov 2007 17:53:17 +0100 X-Delivered-To: Original-Received: (qmail 21959 invoked from network); 5 Nov 2007 16:53:25 -0000 Original-Received: from unknown (HELO lola.quinscape.zz) ([10.0.3.43]) (envelope-sender ) by ns.quinscape.de (qmail-ldap-1.03) with SMTP for ; 5 Nov 2007 16:53:25 -0000 Original-Received: by lola.quinscape.zz (Postfix, from userid 1001) id 2316E8F2D3; Mon, 5 Nov 2007 17:53:24 +0100 (CET) In-Reply-To: <867ikwhcqi.fsf@macs.hw.ac.uk> (Joe Wells's message of "Mon\, 05 Nov 2007 16\:35\:17 +0000") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:82593 Archived-At: Joe Wells writes: > David Kastrup writes: > >> Stefan Monnier writes: >> >>>> I think that the before-string should, in effect, use >>>> (get-char-property (overlay-start ov) 'face) >>>> to determine the face to use if no fully specified face is in the >>>> before-string. >>> >>> No. Go read the beginning of this thread again where I explained >>> why this is bad: it's (much) harder to remove a face than to add >>> one. >> >> Then our problem is that it is much harder to remove a face than to >> add one. And that is the problem we should fix. > > It's not actually an issue of =E2=80=9Cremoving=E2=80=9D a face. The iss= ue is > actually =E2=80=9Cpreventing inheritance=E2=80=9D of a face. > >>> Also text-properties should not affect before/after-strings. >> >> I don't see why not if they are appropriately sticky. > > An example application is linum.el. This code needs to display > strings at the beginning of each line and the strings need to be > displayed with a face independent of the face of the adjacent text > (regardless of whether there are sticky text properties there). That's what I say: instead of making the behavior illogical in order to default to some behavior good for some application, we should add the facility for the application to explicitly request the behavior it needs. >> Resolving partially specified faces goes through priorities. If >> there are usage cases for before/after-string that should not >> inherit, then we need to add a way to say "completely resolve to >> 'default (or whatever other face) here". Then things like lineno >> can use that way. > > The idea of =E2=80=9Ccompletely resolve to default=E2=80=9D sounds intere= sting > (independently of what we are discussing). > >> But it does not make sense to substitute a missing facility with >> some fixed but illogical rules that cater for some but not all use >> cases because it is easier to override this in that manner. > > The problem is that the existing rules are already illogical Because of a bug. > and we are trying to figure out how to make them less illogical. What I see happening is that the current bug is used as an excuse to establish a different inconsistent behavior as "correct", based on convenience for some applications. Basically "if we are being inconsistent, we might as well be inconsistent in a more convenient manner." And I do not consider this a good idea. If the consistent and logical behavior is inconvenient for some applications, we need to add the facilities for overriding it. But the override should not become a fixed default. --=20 David Kastrup