[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there a way to convert a keyboard macro to a string?
From: |
Stefan Monnier |
Subject: |
Re: Is there a way to convert a keyboard macro to a string? |
Date: |
Wed, 26 Jul 2017 14:40:00 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
> Thanks, that was _exactly_ what I needed! This means that what I want
> is to first use seq-into (wrapped in condition-case), and if that fails,
> key-description. Emacs did not disappoint! ;-)
I think that's the wrong approach: the kinds of strings returned
are different.
E.g for a vector like [?\C-a], seq-into will return a string with
a single char (the ASCII code 1), whereas key-description will return
the string "C-a".
The most likely situation is that you always want to use
`key-description` because the reason for wanting a string is to
have a human-readable representation of the sequence of events.
Stefan
- Re: Is there a way to convert a keyboard macro to a string?, (continued)
Re: Is there a way to convert a keyboard macro to a string?, Marcin Borkowski, 2017/07/26