all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Travis Foster <tsfoster@mtu.edu>
Cc: 25348@debbugs.gnu.org
Subject: bug#25348: `display` property faces are prioritized above overlays
Date: Wed, 04 Jan 2017 18:06:31 +0200	[thread overview]
Message-ID: <83vatuernc.fsf@gnu.org> (raw)
In-Reply-To: <CADS09+CkaiN=5dNCn36Hnz4XUX3_GCpzf0TnobBeUKPUBjbgHA@mail.gmail.com> (message from Travis Foster on Tue, 3 Jan 2017 14:52:26 -0800)

> From: Travis Foster <tsfoster@mtu.edu>
> Date: Tue, 3 Jan 2017 14:52:26 -0800
> 
> Yes, the text in the buffer is replaced by its display text, with the face. Then, I would expect the overlay to apply
> to all the text on the line, including the replacement text. Since the properties in overlays are supposed to take
> priority over the properties in the buffer itself, I don't think it makes sense for the replacement to take priority
> over the overlay. Is that wrong?

Drew is right: the priority of overlays over text properties only
comes into play when both text properties and overlays are set on the
same region of text.  In your case, the 'face' property is put on a
display string, whereas the hl-line overlay is on buffer text.  So
priority considerations don't apply here.

> It seems that the replacement should occur, and then the resulting
> text should be modified further by the overlay.

Emacs uses the face from the overlay only for text to which this
overlay is applied.  The display string is therefore using its own
face definitions, which completely override those from the hl-line
overlay.

If you define a face for the display string that only specifies a
foreground color, then Emacs will use the hl-line overlay for the
background color.

This is normal operation of the Emacs display engine, it has been like
that since Emacs 21.  IOW, this is not a bug.





  reply	other threads:[~2017-01-04 16:06 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 [this message]
2017-01-04 19:25       ` Travis Foster
2017-01-04 19:55         ` Eli Zaretskii
2017-01-04 21:59           ` Travis Foster
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

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

  git send-email \
    --in-reply-to=83vatuernc.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=25348@debbugs.gnu.org \
    --cc=tsfoster@mtu.edu \
    /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.