all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joe Wells <jbw@macs.hw.ac.uk>
To: rms@gnu.org
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Fwd: overlay face property not used for after-string property
Date: Tue, 06 Nov 2007 03:30:05 +0000	[thread overview]
Message-ID: <86lk9cf3uq.fsf@macs.hw.ac.uk> (raw)
In-Reply-To: <E1IpDyz-0003f3-ED@fencepost.gnu.org> (Richard Stallman's message of "Mon\, 05 Nov 2007 21\:16\:01 -0500")

Richard Stallman <rms@gnu.org> 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

  reply	other threads:[~2007-11-06  3:30 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-22  9:00 [jbw@macs.hw.ac.uk: overlay face property not used for after-string property] Richard Stallman
2007-10-22 15:44 ` Fwd: overlay face property not used for after-string property Stefan Monnier
2007-10-24  9:49   ` Joe Wells
     [not found]   ` <E1Im8Y2-0000zW-Tn@fencepost.gnu.org>
2007-10-28 15:06     ` Joe Wells
2007-10-28 15:21       ` Johan Bockgård
2007-10-29  9:22       ` Richard Stallman
2007-10-29  9:57         ` Joe Wells
2007-11-03  3:58           ` Richard Stallman
2007-11-03 16:03             ` Joe Wells
2007-11-04 19:56               ` Richard Stallman
2007-11-04 23:03                 ` Joe Wells
2007-11-05  8:47                   ` Richard Stallman
2007-11-05  9:30                     ` David Kastrup
2007-11-05 11:51                       ` Joe Wells
2007-11-05 12:05                         ` Joe Wells
2007-11-06  2:16                           ` Richard Stallman
2007-11-06  3:30                             ` Joe Wells [this message]
2007-11-06  8:30                               ` Stefan Monnier
2007-11-06  9:18                                 ` David Kastrup
2007-11-06 10:05                                   ` Stefan Monnier
2007-11-07  0:15                                 ` Richard Stallman
2007-11-07  0:15                               ` Richard Stallman
2007-11-06  2:15                         ` Richard Stallman
2007-11-06  3:19                           ` Joe Wells
2007-11-05 14:55                       ` Stefan Monnier
2007-11-05 15:04                         ` David Kastrup
2007-11-05 16:35                           ` Joe Wells
2007-11-05 16:53                             ` David Kastrup
2007-11-05 22:06                               ` Joe Wells
2007-11-05 16:29                         ` Joe Wells
2007-11-05 19:38                           ` Stefan Monnier
2007-11-05 21:59                             ` Joe Wells
2007-11-06  8:37                               ` Richard Stallman
2007-11-06  2:16                         ` Richard Stallman
2007-11-05 11:55                     ` Joe Wells
2007-11-06  2:16                       ` Richard Stallman
2007-11-04 19:56               ` Richard Stallman
2007-11-04 23:10                 ` Joe Wells
2007-11-03 19:21             ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86lk9cf3uq.fsf@macs.hw.ac.uk \
    --to=jbw@macs.hw.ac.uk \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.