all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Akib Azmain Turja <akib@disroot.org>
To: emacs-devel@gnu.org
Subject: Replacing spec of display text property uses wrong when set as before-string or after-string property of an overlay
Date: Tue, 10 May 2022 20:37:04 +0600	[thread overview]
Message-ID: <87h75xcv3j.fsf@disroot.org> (raw)

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


Here is an example code:

------------
(let ((txt-disp (concat " " (propertize "_" 'display "foobar") " "))
      (ov (make-overlay (point-min) (point-max))))
  (overlay-put ov 'before-string
	       (propertize txt-disp 'face
		           `(:weight bold :foreground "red"
                                     :background "yellow"))))

;; To remove the overlay call `delete-all-overlays`.
------------

After executing the above " foobar " should appear at the beginning of
buffer with red foreground and yellow background.  But the "foobar" part
doesn't use any color (i.e uses the face of the real text at the
beginning of buffer).  This doesn't happen when the text is inserted.
Is it a bug?

-- 
Akib Azmain Turja

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

             reply	other threads:[~2022-05-10 14:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 14:37 Akib Azmain Turja [this message]
2022-05-10 16:18 ` Replacing spec of display text property uses wrong when set as before-string or after-string property of an overlay Eli Zaretskii

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=87h75xcv3j.fsf@disroot.org \
    --to=akib@disroot.org \
    --cc=emacs-devel@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.