all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Nicolas P. Rougier (inria)" <nicolas.rougier@inria.fr>
To: Gregory Heytings <gregory@heytings.org>
Cc: emacs-devel@gnu.org
Subject: Re: Reading text properties from a yanked text
Date: Sun, 27 Nov 2022 07:08:42 +0100	[thread overview]
Message-ID: <m1r0xoylbo.fsf@inria.fr> (raw)
In-Reply-To: <f3c1c37c49501f635bf7@heytings.org>


Gregory Heytings [2022-11-26 at 23:26] wrote:
> I think I see what you mean (but I'm not sure).
> Is your recipe the following one?
> 
> emacs -Q
> M-x text-mode RET
> M-: (insert (propertize "Hello" 'face 'bold)) RET
> C-SPC
> M-b
> M-w
> M-: (text-properties-at 0 "<press C-y>") RET
> 
> in which you see the text in bold in the minibuffer before 
> pressing
> RET? (Instead of M-: you could also type (text-properties-at 0 
> "<press
> C-y>") followed by C-x C-e somewhere else.)

Yes, I think this is equivalent to what I did:

Instead of using the M-x / M-:, I write the first line in the 
*scratch* buffer and evaluate it (eval-last-sexp). Then I copy the 
output and I write the second line using the killed text.

I can see the bold text in the buffer when I yank it but when I 
evaluate the second line (text-properties...), it says there is no 
properties. However, if I use M-x: describe-char on any of the 
yanked character, it says, it has a bold face.

Nicolas

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



  reply	other threads:[~2022-11-27  6:08 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 ` [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) [this message]
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=m1r0xoylbo.fsf@inria.fr \
    --to=nicolas.rougier@inria.fr \
    --cc=emacs-devel@gnu.org \
    --cc=gregory@heytings.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.