GNU bug report logs - #73764
format-kbd-macro returns a key name that keymap-lookup doesn't recognize

Previous Next

Package: emacs;

Reported by: Eduardo Ochs <eduardoochs <at> gmail.com>

Date: Sat, 12 Oct 2024 04:47:02 UTC

Severity: normal

Full log


Message #32 received at 73764 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, rpluim <at> gmail.com
Cc: 73764 <at> debbugs.gnu.org, schwab <at> linux-m68k.org, monnier <at> iro.umontreal.ca,
 eduardoochs <at> gmail.com
Subject: Re: bug#73764: format-kbd-macro returns a key name that keymap-lookup
 doesn't recognize
Date: Mon, 14 Oct 2024 14:48:41 -0700
Eli Zaretskii <eliz <at> gnu.org> writes:

> In any case, there's the more general issue at hand here:
> keymap--check is (at least in this case) unnecessarily restrictive:
> where key-parse will gladly accept and correctly process a key whose
> modifiers are in any order, keymap--check insist on the canonical
> order.  I'm not sure I like this, at least in non-interactive
> functions.

One issue that these new functions tried to resolve was that the old
functions were too lenient.  See, for example, this passage in the
manual, and its docstring:

     The ‘kbd’ function is very permissive, and will try to return
     something sensible even if the syntax used isn't completely
     conforming.  To check whether the syntax is actually valid, use the
     ‘key-valid-p’ function.

So this strict behaviour is not by accident, and we should probably
think twice before going back on this design decision.

At least, we should review the old arguments to make sure we don't bring
back any undesired/buggy behaviour that this was supposed to remedy.
I didn't have the time to do that fully, as there are many relevant
threads from around that period, both on emacs-devel and bug-gnu-emacs.




This bug report was last modified 340 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.