GNU bug report logs -
#1222
overlay display inherits face properties from buffer
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Wed, 22 Oct 2008 01:10:04 UTC
Severity: minor
Tags: notabug
Found in version 23.0.60
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1222 in the body.
You can then email your comments to 1222 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Message #3 received at quiet <at> emacsbugs.donarmstrong.com (full text, mbox):
Package: emacs
Version: 23.0.60
Severity: minor
This bug is extracted from #1176, which contained several issues.
The display property of an overlay inherits face properties from the
following buffer text. The workaround is to fully specify the face
properties of the display text.
Example:
(let ((buff (generate-new-buffer "overlay test"))
o)
(with-current-buffer buff
(insert (propertize "text" 'face '(:background "red")))
(setq o (make-overlay (point-min) (point-max)))
(overlay-put o 'display "display")
;;; (overlay-put o 'display (propertize "display" 'face 'default))
(pop-to-buffer buff)))
"display" has a red background. The commented out part shows the
workaround.
Message #6 received at 1222-quiet <at> emacsbugs.donarmstrong.com (full text, mbox):
This issue also affects before- and after-strings, albeit in slightly
different ways:
Example:
(let ((buff (generate-new-buffer "overlay test"))
o)
(with-current-buffer buff
(insert (propertize "text" 'face '(:background "red")))
(setq o (make-overlay (point-min) (point-max)))
(overlay-put o 'display "display")
(overlay-put o 'before-string "before-string")
(overlay-put o 'after-string "after-string")
(insert (propertize "more" 'face '(:background "green")))
(pop-to-buffer buff)))
"before-string" and "display" have a red background, "after-string"
has a green background.
Ideally, face properties should not be inherited from the buffer in
this way.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#1222
; Package
emacs
.
(Mon, 30 Sep 2019 07:02:02 GMT)
Full text and
rfc822 format available.
Message #9 received at 1222 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris <rgm <at> gnu.org> writes:
> This issue also affects before- and after-strings, albeit in slightly
> different ways:
>
> Example:
>
> (let ((buff (generate-new-buffer "overlay test"))
> o)
> (with-current-buffer buff
> (insert (propertize "text" 'face '(:background "red")))
> (setq o (make-overlay (point-min) (point-max)))
> (overlay-put o 'display "display")
> (overlay-put o 'before-string "before-string")
> (overlay-put o 'after-string "after-string")
> (insert (propertize "more" 'face '(:background "green")))
> (pop-to-buffer buff)))
>
> "before-string" and "display" have a red background, "after-string"
> has a green background.
>
> Ideally, face properties should not be inherited from the buffer in
> this way.
Hm... is this the same as bug#25348? If so, it was decided there that
this was behaviour as designed, I think.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#1222
; Package
emacs
.
(Mon, 30 Sep 2019 07:46:01 GMT)
Full text and
rfc822 format available.
Message #12 received at 1222 <at> debbugs.gnu.org (full text, mbox):
tags 1222 notabug
thanks
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Mon, 30 Sep 2019 09:01:13 +0200
> Cc: 1222 <at> debbugs.gnu.org
>
> Glenn Morris <rgm <at> gnu.org> writes:
>
> > This issue also affects before- and after-strings, albeit in slightly
> > different ways:
> >
> > Example:
> >
> > (let ((buff (generate-new-buffer "overlay test"))
> > o)
> > (with-current-buffer buff
> > (insert (propertize "text" 'face '(:background "red")))
> > (setq o (make-overlay (point-min) (point-max)))
> > (overlay-put o 'display "display")
> > (overlay-put o 'before-string "before-string")
> > (overlay-put o 'after-string "after-string")
> > (insert (propertize "more" 'face '(:background "green")))
> > (pop-to-buffer buff)))
> >
> > "before-string" and "display" have a red background, "after-string"
> > has a green background.
> >
> > Ideally, face properties should not be inherited from the buffer in
> > this way.
>
> Hm... is this the same as bug#25348? If so, it was decided there that
> this was behaviour as designed, I think.
No, it isn't related to bug#25348. But it's "as designed"
nonetheless: the display engine always merges all the sources of the
face information relevant to the current buffer position. This is
documented in the ELisp manual, see the beginning of the node
"Displaying Faces" (I believe this wasn't documented at the time this
bug was filed).
IOW, what is reported here is the expected behavior, that's how the
code was designed and implemented.
P.S. The original report says "inherits face properties from the
following buffer text", but the "following" part is only accurate when
referring to how text appears on display. The Lisp code in the report
clearly puts the red background on the text "covered" by the overlay,
so that background affects the buffer position(s) where the overlay is
set up.
Added tag(s) notabug.
Request was from
Eli Zaretskii <eliz <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 30 Sep 2019 07:46:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
1222 <at> debbugs.gnu.org and Glenn Morris <rgm <at> gnu.org>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 30 Sep 2019 07:47:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 28 Oct 2019 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 194 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.