this post was submitted on 14 Nov 2023
2 points (100.0% liked)
Emacs
311 readers
1 users here now
A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!
Get Emacs
Rules
- Posts should be emacs related
- Be kind please
- Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.
Emacs Resources
Emacs Tutorials
- Beginner’s Guide to Emacs
- Absolute Beginner's Guide to Emacs
- How to Learn Emacs: A Hand-drawn One-pager for Beginners
Useful Emacs configuration files and distributions
Quick pain-saver tip
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Looks like a bug (whether documentation or code) as
read-kbd-macro
still claims to return a string if possible, but nowadays it forcibly returns a vector. PleaseM-x report-emacs-bug
to get that clarified.You could extract a string of characters from the vector:
But if you look at the code for
read-kbd-macro
you'll see that it calls this:Hence the string value you wanted is coming from
kbd
:There are of course arguments you can pass to
kbd
which won't return a string, but that would always have been the case for your code, and presumably you're not attempting to use any of those.