all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Reading text properties from a yanked text
@ 2022-11-26 21:35 Nicolas P. Rougier (inria)
  2022-11-26 23:03 ` [External] : " Drew Adams
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Nicolas P. Rougier (inria) @ 2022-11-26 21:35 UTC (permalink / raw)
  To: emacs-devel


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



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-12-01 23:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-26 21:35 Reading text properties from a yanked text Nicolas P. Rougier (inria)
2022-11-26 23:03 ` [External] : " Drew Adams
2022-11-27  6:07   ` Nicolas P. Rougier (inria)
2022-11-27  7:08     ` Stefan Monnier
2022-11-26 23:26 ` Gregory Heytings
2022-11-27  6:08   ` Nicolas P. Rougier (inria)
2022-11-27  6:14 ` Eli Zaretskii
2022-11-27  6:16   ` Nicolas P. Rougier (inria)
2022-11-27  7:10     ` Eli Zaretskii
2022-11-27  7:29       ` Nicolas P. Rougier (inria)
2022-12-01 23:25         ` Richard Stallman
2022-11-27  7:10     ` Gregory Heytings
2022-11-27  7:14       ` Gregory Heytings

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.