GNU bug report logs - #55708
(key-description (kbd "C-F")) becomes "C-f"

Previous Next

Package: emacs;

Reported by: meedstrom <at> teknik.io

Date: Sun, 29 May 2022 15:35:02 UTC

Severity: normal

Tags: wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55708 in the body.
You can then email your comments to 55708 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#55708; Package emacs. (Sun, 29 May 2022 15:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to meedstrom <at> teknik.io:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 29 May 2022 15:35:02 GMT) Full text and rfc822 format available.

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

From: meedstrom <at> teknik.io
To: bug-gnu-emacs <at> gnu.org
Subject: (key-description (kbd "C-F")) becomes "C-f"
Date: Sun, 29 May 2022 14:34:00 +0000
[Message part 1 (text/plain, inline)]
In Emacs 29, running emacs -Q, we get inconsistent results:

(key-description (kbd "M-F")) returns "M-F"
(key-description (kbd "H-F")) returns "H-F"
(key-description (kbd "A-F")) returns "A-F"

but

(key-description (kbd "C-F")) returns "C-f"

I would have expected to see either "C-F" or "C-S-f".   

It's probably not related to `translate-upper-case-key-bindings' is nil, it's the same result either way.

I don't know if you consider this behavior a bug, but I rely on this function chain to "normalize"  descriptions such as C-<M-backspace> to C-M-<backspace>.  If there's an alternative way to do that I'd be happy to hear about it!

Martin

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0)
System Description: Guix System

Configured using:
'configure
CONFIG_SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash
SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash

--prefix=/gnu/store/bf2n69a7pqj3w22z8702h90l77rh2bkf-emacs-next-pgtk-29.0.50-0.38d87c4
--enable-fast-install --with-pgtk --with-xwidgets --with-modules
--with-cairo --disable-build-details'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LIBOTF LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PGTK PNG
RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS XIM XWIDGETS
GTK3 ZLIB

Important settings:
  value of $EMACSLOADPATH: /home/kept/guix-profiles/emacs/emacs/share/emacs/site-lisp:/gnu/store/bf2n69a7pqj3w22z8702h90l77rh2bkf-emacs-next-pgtk-29.0.50-0.38d87c4/share/emacs/29.0.50/lisp:/gnu/store/bf2n69a7pqj3w22z8702h90l77rh2bkf-emacs-next-pgtk-29.0.50-0.38d87c4/share/emacs/29.0.50/lisp
  value of $LANG: en_DK.utf8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media rmc puny
dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg
rfc6068 epg-config gnus-util text-property-search time-date seq gv
subr-x byte-opt bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
two-column iso-transl tooltip eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win
term/common-win 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 simple cl-generic 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 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 xwidget-internal dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
gtk pgtk multi-tty make-network-process emacs)

Memory information:
((conses 16 44769 5884)
(symbols 48 5735 1)
(strings 32 15969 2383)
(string-bytes 1 541844)
(vectors 16 12239)
(vector-slots 8 171121 8958)
(floats 8 21 42)
(intervals 56 263 9)
(buffers 992 11))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55708; Package emacs. (Sun, 29 May 2022 16:21:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: meedstrom <at> teknik.io
Cc: 55708 <at> debbugs.gnu.org
Subject: Re: bug#55708: (key-description (kbd "C-F")) becomes "C-f"
Date: Sun, 29 May 2022 19:20:03 +0300
> Date: Sun, 29 May 2022 14:34:00 +0000
> From: meedstrom--- via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> In Emacs 29, running emacs -Q, we get inconsistent results:
> 
> (key-description (kbd "M-F")) returns "M-F"
> (key-description (kbd "H-F")) returns "H-F"
> (key-description (kbd "A-F")) returns "A-F"
> 
> but
> 
> (key-description (kbd "C-F")) returns "C-f"
> 
> I would have expected to see either "C-F" or "C-S-f". 
> 
> It's probably not related to `translate-upper-case-key-bindings' is nil, it's the same result either way.

I think it's because C-f is a character, unlike M-f and H-f.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55708; Package emacs. (Sun, 29 May 2022 16:42:01 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: meedstrom--- via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs <at> gnu.org>
Cc: meedstrom <at> teknik.io, 55708 <at> debbugs.gnu.org
Subject: Re: bug#55708: (key-description (kbd "C-F")) becomes "C-f"
Date: Sun, 29 May 2022 18:41:04 +0200
On Mai 29 2022, meedstrom--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> In Emacs 29, running emacs -Q, we get inconsistent results:
>
> (key-description (kbd "M-F")) returns "M-F"
> (key-description (kbd "H-F")) returns "H-F"
> (key-description (kbd "A-F")) returns "A-F"
>
> but
>
> (key-description (kbd "C-F")) returns "C-f"

This is consistent with the lisp reader, which also returns ?\C-f for
?\C-F.  Note that this happens for all keys that contain control
modified letters, independent of the other modifiers.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55708; Package emacs. (Sun, 29 May 2022 16:42:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55708; Package emacs. (Sun, 29 May 2022 23:15:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: meedstrom <at> teknik.io
Cc: 55708 <at> debbugs.gnu.org
Subject: Re: bug#55708: (key-description (kbd "C-F")) becomes "C-f"
Date: Mon, 30 May 2022 01:14:08 +0200
meedstrom <at> teknik.io writes:

> (key-description (kbd "C-F")) returns "C-f"

As others have alluded to, this is for historical reasons, and I'm not
sure that we can change this now.  That is,

(equal (kbd "C-F") (kbd "C-f"))
=> t

(And on terminals, there's no difference between `C-f' and `C-F'.)

However,

(key-description (kbd "C-S-f"))
=> "C-S-f"

That is, if you explicitly put a shift modifier in there, you can
round-trip the key.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55708; Package emacs. (Thu, 02 Jun 2022 09:41:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: meedstrom <at> teknik.io
Cc: 55708 <at> debbugs.gnu.org
Subject: Re: bug#55708: (key-description (kbd "C-F")) becomes "C-f"
Date: Thu, 02 Jun 2022 11:40:28 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

>> (key-description (kbd "C-F")) returns "C-f"
>
> As others have alluded to, this is for historical reasons, and I'm not
> sure that we can change this now.  That is,
>
> (equal (kbd "C-F") (kbd "C-f"))
> => t
>
> (And on terminals, there's no difference between `C-f' and `C-F'.)
>
> However,
>
> (key-description (kbd "C-S-f"))
> => "C-S-f"
>
> That is, if you explicitly put a shift modifier in there, you can
> round-trip the key.

So I don't think there's anything we want to do here, and I'm therefore
closing this bug report.

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




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 02 Jun 2022 09:41:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 55708 <at> debbugs.gnu.org and meedstrom <at> teknik.io Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 02 Jun 2022 09:41:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 30 Jun 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 359 days ago.

Previous Next


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