From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Nicolas P. Rougier (inria)" Newsgroups: gmane.emacs.devel Subject: Reading text properties from a yanked text Date: Sat, 26 Nov 2022 22:35:13 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19390"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.11; emacs 28.2 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 26 22:48:05 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oz31o-0004qV-Ac for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Nov 2022 22:48:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oz31B-0002kH-AE; Sat, 26 Nov 2022 16:47:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oz319-0002jr-Np for emacs-devel@gnu.org; Sat, 26 Nov 2022 16:47:23 -0500 Original-Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oz317-0008Lw-F5 for emacs-devel@gnu.org; Sat, 26 Nov 2022 16:47:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=HNKOmn7RH8qcrIQjGQKexpd3IANHXXNLn06JbAJJshU=; b=AJ35veeoGwQ7td4DzjVUp/kO0g8dfQv2etF/s8kVvt1AQoRiqYnu8ofe MN11SHBswF1m6OrAkuTqWOs0ocJ7Vjh7pdgV2btRVjFKS6xLaCwv3yDRL IItjgj45r/HNuSVbFq8t66b490M+/sDLyKtZA9gi8DTBH+7zDMqRUnhwb 4=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=nicolas.rougier@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.96,197,1665439200"; d="scan'208";a="80204923" Original-Received: from 91-160-114-139.subs.proxad.net (HELO M-E7-NPR) ([91.160.114.139]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2022 22:47:13 +0100 Received-SPF: pass client-ip=192.134.164.83; envelope-from=nicolas.rougier@inria.fr; helo=mail2-relais-roc.national.inria.fr X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300596 Archived-At: Hello, I'm trying to read the properties of a yanked string and I do not=20 understand why I get a nil result: 1. I evaluate the line below to get a bold "Hello" and I copy the=20 result in the kill ring. (insert (propertize "Hello" 'face 'bold)) 2. If I try to get the properties of the yanked text, I get=20 nil. However, the text is displayed bold and a (text-properties-at=20 (point)) returns '(face bold) when point is on the H letter. (text-properties-at 0 "Hello")=20 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=20 the text is displayed bold? Nicolas --=20 Nicolas P. Rougier =E2=80=94=E2=80=94 www.labri.fr/perso/nrougier Institute of Neurodegenerative Diseases, Bordeaux