From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Wells Newsgroups: gmane.emacs.devel Subject: Re: Fwd: overlay face property not used for after-string property Date: Tue, 06 Nov 2007 03:30:05 +0000 Message-ID: <86lk9cf3uq.fsf@macs.hw.ac.uk> 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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1194319832 26463 80.91.229.12 (6 Nov 2007 03:30:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Nov 2007 03:30:32 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 06 04:30:35 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 1IpF92-0008SZ-S6 for ged-emacs-devel@m.gmane.org; Tue, 06 Nov 2007 04:30:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IpF8s-00022Y-3v for ged-emacs-devel@m.gmane.org; Mon, 05 Nov 2007 22:30:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IpF8p-00020u-1v for emacs-devel@gnu.org; Mon, 05 Nov 2007 22:30:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IpF8o-00020O-I6 for emacs-devel@gnu.org; Mon, 05 Nov 2007 22:30:14 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IpF8o-00020I-GL for emacs-devel@gnu.org; Mon, 05 Nov 2007 22:30:14 -0500 Original-Received: from izanami.macs.hw.ac.uk ([137.195.13.6]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IpF8g-0001je-6T; Mon, 05 Nov 2007 22:30:06 -0500 Original-Received: from lxultra1.macs.hw.ac.uk ([137.195.27.173]:48490 helo=127.0.0.1) by izanami.macs.hw.ac.uk with smtp (Exim 4.51) id 1IpF8f-0008R0-2F; Tue, 06 Nov 2007 03:30:05 +0000 Original-Received: (nullmailer pid 3658 invoked by uid 1001); Tue, 06 Nov 2007 03:30:05 -0000 In-Reply-To: (Richard Stallman's message of "Mon\, 05 Nov 2007 21\:16\:01 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) 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:82622 Archived-At: Richard Stallman writes: > An additional point. Suppose the overlay has both before-string > and display properties. (Yes, you need to do this if you want > to use an overlay to replace the text in the buffer and display > multiple images or a mixture of text and images.) (And by the way, this would be easier and less awkward if at least one additional level of string display property inside overlay display property was supported. But this doesn't affect the issue we are discussing here.) > The display property replaces the display of the text in the > buffer (and possibly specifies a different face for it). It > makes no logical sense in this case for the display of the > before-string to use the face of a character in the buffer that > is being concealed. > > In some cases it does. Consider a paragraph that is italicized > with a text property. Shouldn't substitute text be italic by > default? Counterexample: linum.el. 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). Comments? -- Joe