bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#52448: key-valid-p vs "C-M-x" and "ESC C-x"


From: Lars Ingebrigtsen
Subject: bug#52448: key-valid-p vs "C-M-x" and "ESC C-x"
Date: Sun, 12 Dec 2021 09:27:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Kangas <stefan@marxist.se> writes:

> AFAIU, we want exactly one valid way to write keybindings with
> `key-valid-p'.  Should both of these be `key-valid-p'?
>
> 1.  (key-description (kbd "ESC C-x"))
>     => "C-M-x"
>
>     (key-valid-p "ESC C-x")
>     => t

That's what happens today, but Stefan M had a cunning plan to make
round-tripping these keystrokes (EST/TAB/RET) work better.

In that case

"ESC C-x"

and

"C-M-x"

would still both be valid, but refer to different things (that get
resolved to the same thing).

But we're not there today, so when writing keymaps one should use the
intended mnemonics.  For instance, it's

  "C-c C-i" #'gnus-info-find-node

and not

  "C-c TAB" #'gnus-info-find-node

because the "i" is for "info".

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]