all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "Nicolas P. Rougier (inria)" <nicolas.rougier@inria.fr>,
	"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [External] : Reading text properties from a yanked text
Date: Sat, 26 Nov 2022 23:03:53 +0000	[thread overview]
Message-ID: <SJ0PR10MB5488CB27AB72CE5EE069E595F3119@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <m1zgcdxuap.fsf@inria.fr>

> 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?

Not sure what you're asking.
But do either of these user options help?

 `yank-excluded-properties'
 `yank-handled-properties'

  reply	other threads:[~2022-11-26 23:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-26 21:35 Reading text properties from a yanked text Nicolas P. Rougier (inria)
2022-11-26 23:03 ` Drew Adams [this message]
2022-11-27  6:07   ` [External] : " 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

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=SJ0PR10MB5488CB27AB72CE5EE069E595F3119@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=nicolas.rougier@inria.fr \
    /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.