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: Sun, 04 Nov 2007 23:03:06 +0000 [thread overview]
Message-ID: <86y7ddipg5.fsf_-_@macs.hw.ac.uk> (raw)
In-Reply-To: <E1IolaU-0005Y0-Oj@fencepost.gnu.org> (Richard Stallman's message of "Sun\, 04 Nov 2007 14\:56\:50 -0500")
Richard Stallman <rms@gnu.org> writes:
> I agree that it is simple and clear. However, given the point
> you made above, I think it would be better if before-string and
> after-string properties were affected by the face property of
> other overlays (regardless of whether they should be affected by
> the face property of the same overlay).
>
> Do you mean ALL other overlays?
>
> So if there are two overlays A and B, A's before-string shoud be
> affected by B's face and vice versa? That doesn't sound quite right
> to me, but I don't have a feel for just what would be right.
Neither do I.
I would expect if someone put an overlay that contains the entire
buffer, this would affect all things displayed in the buffer from
overlays at lower priority.
I would expect if overlay o2 completely contains overlay o1 and
overlay o2's priority is higher than overlay o1's priority, then
overlay o2's face would affect all things displayed by overlay o1.
The above items seem clearly right. However, a lot of strange corner
cases arise.
What if overlay o1 and overlay o2 cover the exact same region and have
the same priority? Should they affect the display of each other's
before-string, display, and after-string properties?
What if
(and (<= (overlay-start o2) (overlay-start o1))
(<= (overlay-start o1) (overlay-end o2))
(< (overlay-end o2) (overlay-end o1))
(< (overlay-get o1 'priority) (overlay-get o2 'priority)))
? Should overlay o2's face affect overlay o1's before-string (but not
its after-string)?
And there are other cases to consider.
Comments from people who have implemented stuff using overlays would
be welcome here.
> So I have installed a change that makes available, to the function to
> choose the base face, the overlay from which the overlay string came.
> The function is now called `face_for_overlay_string', and it is in
> xfaces.c. Given that info, people could implement whatever policy
> seems right.
I think this information may not be enough. I think the policy would
also need to know which of the overlay properties before-string,
display, or after-string the string comes from. (Note that coming
from an overlay's display string is distinct from coming from a
display string as a text property on an overlay's before-string, which
should count as coming from the before-string.)
--
Joe
> But I don't want to try implementing a different policy myself. I
> don't have an actual use for this feature, so I could try five
> different policies with no reason to expect any of them to be good for
> actual use.
>
> I will leave this part for others.
next prev parent reply other threads:[~2007-11-04 23:03 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 [this message]
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
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=86y7ddipg5.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.