unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#55708: (key-description (kbd "C-F")) becomes "C-f"
@ 2022-05-29 14:34 meedstrom--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-05-29 16:20 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: meedstrom--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-05-29 14:34 UTC (permalink / raw)
  To: 55708

[-- Attachment #1: Type: text/plain, Size: 4119 bytes --]

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))

[-- Attachment #2: Type: text/html, Size: 5236 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#55708: (key-description (kbd "C-F")) becomes "C-f"
  2022-05-29 14:34 bug#55708: (key-description (kbd "C-F")) becomes "C-f" meedstrom--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-05-29 16:20 ` Eli Zaretskii
  2022-05-29 16:41 ` Andreas Schwab
  2022-05-29 23:14 ` Lars Ingebrigtsen
  2 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2022-05-29 16:20 UTC (permalink / raw)
  To: meedstrom; +Cc: 55708

> 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@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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#55708: (key-description (kbd "C-F")) becomes "C-f"
  2022-05-29 14:34 bug#55708: (key-description (kbd "C-F")) becomes "C-f" meedstrom--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-05-29 16:20 ` Eli Zaretskii
@ 2022-05-29 16:41 ` Andreas Schwab
  2022-05-29 23:14 ` Lars Ingebrigtsen
  2 siblings, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2022-05-29 16:41 UTC (permalink / raw)
  To: 55708; +Cc: meedstrom

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@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#55708: (key-description (kbd "C-F")) becomes "C-f"
  2022-05-29 14:34 bug#55708: (key-description (kbd "C-F")) becomes "C-f" meedstrom--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-05-29 16:20 ` Eli Zaretskii
  2022-05-29 16:41 ` Andreas Schwab
@ 2022-05-29 23:14 ` Lars Ingebrigtsen
  2022-06-02  9:40   ` Lars Ingebrigtsen
  2 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-29 23:14 UTC (permalink / raw)
  To: meedstrom; +Cc: 55708

meedstrom@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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#55708: (key-description (kbd "C-F")) becomes "C-f"
  2022-05-29 23:14 ` Lars Ingebrigtsen
@ 2022-06-02  9:40   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-02  9:40 UTC (permalink / raw)
  To: meedstrom; +Cc: 55708

Lars Ingebrigtsen <larsi@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





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-06-02  9:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-29 14:34 bug#55708: (key-description (kbd "C-F")) becomes "C-f" meedstrom--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-29 16:20 ` Eli Zaretskii
2022-05-29 16:41 ` Andreas Schwab
2022-05-29 23:14 ` Lars Ingebrigtsen
2022-06-02  9:40   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).