emacs-devel
[Top][All Lists]
Advanced

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

Reading text properties from a yanked text


From: Nicolas P. Rougier (inria)
Subject: Reading text properties from a yanked text
Date: Sat, 26 Nov 2022 22:35:13 +0100
User-agent: mu4e 1.8.11; emacs 28.2


Hello,

I'm trying to read the properties of a yanked string and I do not understand why I get a nil result:

1. I evaluate the line below to get a bold "Hello" and I copy the result in the kill ring.

(insert (propertize "Hello" 'face 'bold))

2. If I try to get the properties of the yanked text, I get nil. However, the text is displayed bold and a (text-properties-at (point)) returns '(face bold) when point is on the H letter.

(text-properties-at 0 "Hello")
3. This version works as expected (but this is not what I need):
(text-properties-at 0 (propertize "Hello" 'face 'bold))

Why do I get a nil result in case 2 (using Emacs 28.2) even though the text is displayed bold?

Nicolas

--
Nicolas P. Rougier —— www.labri.fr/perso/nrougier
Institute of Neurodegenerative Diseases, Bordeaux



reply via email to

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