unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Travis Foster <tsfoster@mtu.edu>
To: Eli Zaretskii <eliz@gnu.org>, 25348@debbugs.gnu.org
Subject: bug#25348: `display` property faces are prioritized above overlays
Date: Wed, 4 Jan 2017 13:59:00 -0800	[thread overview]
Message-ID: <CADS09+B0ZYp6O2UeJcKUo+v3D+8iZ11P2VK-2vsn-Ki=4cLF=Q@mail.gmail.com> (raw)
In-Reply-To: <83lguqeh10.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2085 bytes --]

> If the face of the display string doesn't specify the background
> color, the only sensible thing to do is to use the background of the
> "underlying" buffer text.  (Note that in this case the issue of
> priority doesn't arise either, because only one of the sources
> specifies the background color.)

Alright ... and the "underlying" face it appears to use is the one applied
to the first character of the replacee text. That makes sense, I guess.

> > So the priority goes: display property faces > overlay faces > buffer
faces. Am I on the right track?
>
> No, because the priority is not being considered in this situation.
> The priority is only considered when the same text has both text
> properties that specify a face and one or more overlays that also
> specify a face.

Apologies, I was using 'priority' in the more general sense of "which faces
will show up on the screen", rather than in the implementation sense of the
overlay `priority` property and priority calculation. Perhaps I should use
another word instead, like 'precedence' or something.

> > it does conflict with the documentation stating that overlays always
> > take priority over text properties.
>
> Not in my view and interpretation, no.

But it appears to, I think. All I'm saying here is that, based entirely on
the wording of the documentation and with no insight into the
implementation, the most intuitive interpretation is that the display text
property should be expanded first, and then the faces and properties from
the overlay should be applied on top of that. I realize that this wouldn't
quite work, since trying to apply an overlay on top of already replaced
text would be problematic, but it's still surprising that the precedence
for faces isn't [overlay display string > overlay text > buffer display
string > buffer text]. I don't know, maybe I'm wrong.

So, alright, this isn't a bug. What if I don't want this behavior, though?
Is there anything I can do to my display properties so that they don't show
through overlays? I sort of doubt it at this point, but I might as well ask.

[-- Attachment #2: Type: text/html, Size: 2422 bytes --]

  reply	other threads:[~2017-01-04 21:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-03 22:17 bug#25348: `display` property faces are prioritized above overlays Travis Foster
2017-01-03 22:29 ` Drew Adams
2017-01-03 22:52   ` Travis Foster
2017-01-04 16:06     ` Eli Zaretskii
2017-01-04 19:25       ` Travis Foster
2017-01-04 19:55         ` Eli Zaretskii
2017-01-04 21:59           ` Travis Foster [this message]
2017-01-05 16:27             ` Eli Zaretskii
2017-01-05 18:10               ` Travis Foster
2019-09-29 16:22       ` Lars Ingebrigtsen

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='CADS09+B0ZYp6O2UeJcKUo+v3D+8iZ11P2VK-2vsn-Ki=4cLF=Q@mail.gmail.com' \
    --to=tsfoster@mtu.edu \
    --cc=25348@debbugs.gnu.org \
    --cc=eliz@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).