help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use display text property with after-string?


From: Joost Kremers
Subject: Re: How to use display text property with after-string?
Date: Fri, 21 Oct 2016 08:59:47 +0200
User-agent: mu4e 0.9.17; emacs 25.1.2


On Fri, Oct 21 2016, Marcin Borkowski wrote:
Hi all,

I want to set the "display" text property so that some text is displayed after the buffer part I'm setting the property to. However, I can't do
it.  Consider an Elisp buffer with these contents:

--8<---------------cut here---------------start------------->8---
;; this is a comment

(put-text-property 14 21 'display '(after-string " which is cool!")) --8<---------------cut here---------------end--------------->8---

After C-x C-e with point at the end, I see this:

--8<---------------cut here---------------start------------->8---
;; this is a comment

(put-text-property 14 21 'display '(after-string " which is cool!")) --8<---------------cut here---------------end--------------->8---

but I expected this:

--8<---------------cut here---------------start------------->8---
;; this is a commentcomment

(put-text-property 14 21 'display '(after-string " which is cool!")) --8<---------------cut here---------------end--------------->8---


I'm getting this (Emacs 25.1.2):

,----
| ;; this is a comment
| | (put-text-property 14 21 'display '(after-string " which is cool!"))
`----

But looknig through the Elisp manual, it seems that `after-string' is an overlay property, not a text property, so what you're after probably isn't supposed to work.



--
Joost Kremers
Life has its moments



reply via email to

[Prev in Thread] Current Thread [Next in Thread]