From: Joe Wells <jbw@macs.hw.ac.uk>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Fwd: overlay face property not used for after-string property
Date: Mon, 05 Nov 2007 21:59:49 +0000 [thread overview]
Message-ID: <86y7dcfj56.fsf@macs.hw.ac.uk> (raw)
In-Reply-To: <jwvabpsij71.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon\, 05 Nov 2007 14\:38\:46 -0500")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> Also text-properties should not affect before/after-strings.
>> Except of course that text properties inside the string itself should
>> have an effect.
>
> Indeed.
>
>>> I believe the
>>> most obviously sensible rule is to follow the precedence that we always use:
>>> - overlays take precedence over text-properties
>
>> I'll assume by “text-properties” you mean “text properties in the
>> buffer”.
>
> Indeed.
>
>>> - overlays of higher priority take precedence over overlays of lower
>>> priority
>
>> Does the higher priority overlay need to entirely contain the
>> lower-priority overlay to have an effect?
>
> No. Note that these rules are general rules about how overlays and
> text-properties interact.
Suppose overlay o2 has higher priority than overlay o1 and covers only
part of overlay o1. Does o2's face affect o1's display property?
>> What if the overlays partially overlap, but neither contains the
>> other?
>
> In general, this makes no difference...
What about overlays' display properties?
>> Suppose the end of overlay o2 is the same as the start of
>> overlay o1: Can overlay o2's face affect overlay o1's before-string?
>
> .. in the case of (before|after)-strings, interpreting what this rule
What is “this rule” here?
> implies is trickier, but I guess it'd be something like:
>
> the overlays that apply to an (before|after)-string are those that
> have higher precedence than the string's overlay and that would apply
> to text inserted at that position in the buffer.
I like this (at least for before-string and after-string, it is not
clear what happens for overlay display properties).
>>> - for overlays of equal priority if one overlay covers the other it takes
>>> precedence
>
>> So covering an overlay is like having higher priority?
>
> Yes.
>
>> What if the two overlays have the same extent?
>
> Then this rule doesn't apply and the next one (the catch-all)
> applies instead.
I don't understand why “this rule” doesn't apply in this case. Can
you explain?
>>> - for the other cases of equal priority, any arbitrary choice is OK as long
>>> as it's deterministic
>>>
>>> Given this, a (before|after)-string should only be affected by
>>> invisible|face properties set by overlays of higher precedence: not by
>>> text-properties, not be overlays of lower precedence.
>
>> So you propose things work by “precedence” which is derived from
>> “priority” and “covering”?
>
> Not quite: instead I described how it currently works in general, and
> I suggest that we solve our problem w.r.t (before|after)-string by
> trying to extrapolate from the existing rules.
>
> I'm not 100% sure the result will be the most convenient in every single
> case, but at least it will have the advantage of being conceptually clean.
Can you write down the full proposed rule set in plain English? I'm
getting lost trying to follow.
--
Joe
next prev parent reply other threads:[~2007-11-05 21:59 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
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 [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86y7dcfj56.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).