From: Stefan Kangas <stefan@marxist.se>
To: Glenn Morris <rgm@gnu.org>
Cc: Juanma Barranquero <lekktu@gmail.com>,
Lars Ingebrigtsen <larsi@gnus.org>,
17052@debbugs.gnu.org
Subject: bug#17052: substitute-command-keys strips text properties
Date: Mon, 16 Nov 2020 17:24:03 -0800 [thread overview]
Message-ID: <CADwFkmmYhUpV+PP81NDVezo6-h=MHumDV_2Nb7fxSriw=--jwA@mail.gmail.com> (raw)
In-Reply-To: <1xh86jb494.fsf@fencepost.gnu.org> (Glenn Morris's message of "Wed, 14 Aug 2019 21:34:47 -0400")
close 17052 28.1
thanks
Glenn Morris <rgm@gnu.org> writes:
>> Looks like this has been fixed sometime in the intervening years?
>>
>> (substitute-command-keys (propertize "foo" 'face 'bold))
>> => #("foo" 0 3 (face bold))
>
> Nope, you need to use an example which does a substitution, eg
>
> (substitute-command-keys (propertize "foo \\[find-file]" 'face 'bold))
This was fixed by the recent rewrite of substitute-command-keys in Lisp.
I've added a test for this in commit 27655f9f38, and am therefore
closing this bug.
(For posterity, the root cause for this was that `princ' does not
preserve text properties. The code now uses `insert' instead.)
next prev parent reply other threads:[~2020-11-17 1:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-20 16:22 bug#17052: substitute-command-keys strips text properties Juanma Barranquero
2019-08-15 0:55 ` Lars Ingebrigtsen
2019-08-15 1:34 ` Glenn Morris
2019-08-15 1:58 ` Lars Ingebrigtsen
2019-08-15 16:46 ` Eli Zaretskii
2019-08-15 22:42 ` Lars Ingebrigtsen
2019-08-16 6:47 ` Eli Zaretskii
2019-08-16 7:04 ` Lars Ingebrigtsen
2019-08-18 17:08 ` Stefan Kangas
2019-08-18 17:19 ` Eli Zaretskii
2019-08-18 22:43 ` Lars Ingebrigtsen
2019-08-19 15:27 ` Eli Zaretskii
2019-08-18 17:19 ` Lars Ingebrigtsen
2020-11-17 1:24 ` Stefan Kangas [this message]
2020-11-17 1:37 ` bug#17052: substitute-command-keys strips text properties, bug#8911: huh? Drew Adams
2020-11-17 2:34 ` Stefan Kangas
2020-11-17 3:00 ` Drew Adams
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='CADwFkmmYhUpV+PP81NDVezo6-h=MHumDV_2Nb7fxSriw=--jwA@mail.gmail.com' \
--to=stefan@marxist.se \
--cc=17052@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=lekktu@gmail.com \
--cc=rgm@gnu.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.