From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Fwd: overlay face property not used for after-string property Date: Tue, 06 Nov 2007 19:15:23 -0500 Message-ID: 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> <86640gj4fx.fsf@macs.hw.ac.uk> <86wsswhp7w.fsf@macs.hw.ac.uk> <86lk9cf3uq.fsf@macs.hw.ac.uk> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1194394593 1713 80.91.229.12 (7 Nov 2007 00:16:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 Nov 2007 00:16:33 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Joe Wells Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 07 01:16:36 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 1IpYav-0001la-5N for ged-emacs-devel@m.gmane.org; Wed, 07 Nov 2007 01:16:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IpYak-0007y2-BD for ged-emacs-devel@m.gmane.org; Tue, 06 Nov 2007 19:16:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IpYZr-0007KI-Kc for emacs-devel@gnu.org; Tue, 06 Nov 2007 19:15:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IpYZq-0007JV-74 for emacs-devel@gnu.org; Tue, 06 Nov 2007 19:15:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IpYZp-0007JO-Vd for emacs-devel@gnu.org; Tue, 06 Nov 2007 19:15:26 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IpYZo-0002Jr-OO for emacs-devel@gnu.org; Tue, 06 Nov 2007 19:15:25 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IpYZn-0003Oq-UM; Tue, 06 Nov 2007 19:15:23 -0500 In-reply-to: <86lk9cf3uq.fsf@macs.hw.ac.uk> (message from Joe Wells on Tue, 06 Nov 2007 03:30:05 +0000) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:82691 Archived-At: I think priorities are probably the solution. Here is an idea. Each face property and each piece of text has a priority. A face property can only affect text of strictly lower priority. The before-string, display (if a string), and after-string properties of an overlay have the priority of their overlay. Text in the buffer has priority 0. The face property of an overlay has the priority of that overlay. A text property face property (i.e., in a string or in the buffer) has the priority of the piece of text plus 0.5 (so that it will affect the text it belongs to). It sounds plausible. Could you figure out how you would use this and verify that it would give correct results in the cases you know about?