Subject: bug#61548: closed (Re: bug#61548: 30.0.50; Command 'keymap-global-set' fails when called interactively)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 11 Mar 2025 05:01:02 +0000

Your bug report

#61548: 30.0.50; Command 'keymap-global-set' fails when called interactively

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
61548: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61548
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#61548: 30.0.50; Command 'keymap-global-set' fails when called interactively
From: Stefan Kangas <[email-masked]>
To: Robert Pluim <[email-masked]>
Cc: Ruijie Yu <[email-masked]>, [email-masked], Eli Zaretskii <[email-masked]>, [email-masked]
Date: Tue, 11 Mar 2025 05:00:10 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Robert Pluim <[email-masked]> writes:

>>>>>> On Thu, 16 Feb 2023 19:33:15 +0800, Ruijie Yu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email-masked]> said:
>
>     >>> Repository revision: fbbf3610fd5b27873e13cfd7702d5b0bbb15c2f8
>
>     RY> Eli Zaretskii <[email-masked]> writes:
>
>     >> [...]
>     >> This code is not in the current function on the master branch.  Are
>     >> you sure your sources are up to date?
>
>     RY> Looking at the git history, it seems that this commit was made on
>     RY> 2022-12-09 -- quite an old commit.  This issue has probably been fixed
>     RY> between then and now, and possibly by bug#61184 (searching for "keymap"
>     RY> on subjects).
>
> Bug#61149 (Bug#61184 was Eli fixing another bug found during fixing it)

It seems like this has been fixed; I can't reproduce it.

I'm therefore closing this bug report.

Subject: 30.0.50; Command 'keymap-global-set' fails when called interactively
From: [email-masked]
To: [email-masked]
Date: Thu, 16 Feb 2023 00:37:58 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Calling 'keymap-global-set' interactively fails with the message

  keymap--check: INPUT is not a valid key definition; see ‘key-valid-p’

where INPUT is the printed representation of the key sequence entered,
unless that sequence is a single unmodified key. And even among those, I
only know alphanumeric keys to be exempt; <f6>, <Scroll_Lock> and
anything you have to put in <brackets> will cause trouble.

>From 'emacs -Q', simply type

  M-x keymap-global-set RET

The problem is that the output from 'read-key-sequence', which is called
by 'keymap-global-set', is not filtered through 'key-description' before
being assigned to KEY:

  (interactive
   (let* ((menu-prompting nil)
          (key (read-key-sequence "Set key globally: " nil t))) ; error
     (list key
           (read-command (format "Set key %s to command: "
                                 (key-description key))))))

This mistake is not made in 'keymap-global-lookup', 'keymap-global-unset',
or any other command I'm aware of. It's easy to fix, and I'd corrected
it in my own build of Emacs, though I've since reverted to an unmodified
build.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.35, cairo version 1.17.6) of 2023-02-15 built on nexus
Repository revision: fbbf3610fd5b27873e13cfd7702d5b0bbb15c2f8
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101006
System Description: Gentoo Linux

Configured using:
 'configure --with-mailutils --with-cairo --with-native-compilation=aot
 --with-modules --with-x-toolkit=gtk --with-imagemagick'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBXML2 MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  windmove-mode: t
  server-mode: t
  shell-dirtrack-mode: t
  minibuffer-depth-indicate-mode: t
  global-visible-mark-mode: t
  visible-mark-mode: t
  corfu-global-mode: t
  corfu-mode: t
  fido-vertical-mode: t
  icomplete-vertical-mode: t
  icomplete-mode: t
  fido-mode: t
  which-key-mode: t
  global-auto-revert-mode: t
  save-place-mode: t
  recentf-mode: t
  savehist-mode: t
  global-so-long-mode: t
  global-display-line-numbers-mode: t
  display-line-numbers-mode: t
  winner-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  column-number-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/phantom/.emacs.d/elpa/transient-20221202.1727/transient hides /usr/local/share/emacs/30.0.50/lisp/transient
/home/phantom/.emacs.d/elpa/use-package-20221209.2013/use-package-diminish hides /usr/local/share/emacs/30.0.50/lisp/use-package/use-package-diminish
/home/phantom/.emacs.d/elpa/use-package-20221209.2013/use-package-core hides /usr/local/share/emacs/30.0.50/lisp/use-package/use-package-core
/home/phantom/.emacs.d/elpa/use-package-20221209.2013/use-package-jump hides /usr/local/share/emacs/30.0.50/lisp/use-package/use-package-jump
/home/phantom/.emacs.d/elpa/use-package-20221209.2013/use-package-bind-key hides /usr/local/share/emacs/30.0.50/lisp/use-package/use-package-bind-key
/home/phantom/.emacs.d/elpa/use-package-20221209.2013/use-package-delight hides /usr/local/share/emacs/30.0.50/lisp/use-package/use-package-delight
/home/phantom/.emacs.d/elpa/use-package-20221209.2013/use-package-ensure hides /usr/local/share/emacs/30.0.50/lisp/use-package/use-package-ensure
/home/phantom/.emacs.d/elpa/use-package-20221209.2013/use-package-lint hides /usr/local/share/emacs/30.0.50/lisp/use-package/use-package-lint
/home/phantom/.emacs.d/elpa/use-package-20221209.2013/use-package hides /usr/local/share/emacs/30.0.50/lisp/use-package/use-package
/home/phantom/.emacs.d/elpa/eglot-20220415.1822/eglot hides /usr/local/share/emacs/30.0.50/lisp/progmodes/eglot

Features:
(shadow emacsbug magit-base magit-section crm mule-util jka-compr
shortdoc mailalias smtpmail textsec uni-scripts idna-mapping
ucs-normalize uni-confusable textsec-check sort gnus-cite nndraft nnmh
nnfolder utf-7 network-stream nsm gnus-agent gnus-srvr gnus-score
score-mode nnvirtual nntp gnus-cache mail-extr gnus-msg gnus-art mm-uu
mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill
kinsoku url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus
xml gnus-cloud nnimap nnmail mail-source utf7 nnoo parse-time iso8601
gnus-spec gnus-int gnus-range gnus-win message sendmail yank-media puny
rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mailabbrev gmm-utils mailheader gnus nnheader gnus-util
text-property-search mail-utils range mm-util mail-prsvr windmove pp
time-date exwm exwm-input xcb-keysyms xcb-xkb exwm-manage exwm-floating
xcb-cursor xcb-render exwm-layout exwm-workspace exwm-core xcb-ewmh
xcb-icccm xcb xcb-xproto xcb-types xcb-debug server dired-aux
modus-vivendi-theme modus-themes comp comp-cstr warnings focus thingatpt
midnight term disp-table shell pcomplete ehelp comint ansi-osc
ansi-color edmacro kmacro dash use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key
use-package-core finder-inf mb-depth visible-mark corfu icomplete
which-key autorevert filenotify saveplace recentf tree-widget wid-edit
savehist so-long cl-extra icons display-line-numbers winner dired
dired-loaddefs bind-key easy-mmode pcase mastodon-autoloads
rainbow-delimiters-autoloads which-key-autoloads company-autoloads
focus-autoloads exwm-autoloads rx minimap-autoloads sicp-autoloads
debbugs-autoloads geiser-guile-autoloads geiser-impl help-fns radix-tree
help-mode geiser-custom geiser-base ring use-package-autoloads
keepass-mode-autoloads projectile-autoloads dynamic-ruler-autoloads
ivy-autoloads request-autoloads transient-autoloads
weather-metno-autoloads caps-lock-autoloads persist-autoloads
yasnippet-snippets-autoloads yasnippet-autoloads typit-autoloads
f-autoloads slime-autoloads vertico-autoloads mmt-autoloads
with-editor-autoloads compat-autoloads ts-autoloads s-autoloads info
visible-mark-autoloads vterm-autoloads package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x
map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 721742 75952)
 (symbols 48 36290 3)
 (strings 32 157373 10554)
 (string-bytes 1 4628365)
 (vectors 16 87620)
 (vector-slots 8 1674405 98457)
 (floats 8 432 459)
 (intervals 56 1790 2)
 (buffers 992 26))