From: Robert Pluim <rpluim@gmail.com>
To: 70139@debbugs.gnu.org
Subject: bug#70139: 29.3.50; key-translate does not support all keyboard-translate usages
Date: Tue, 02 Apr 2024 11:50:40 +0200 [thread overview]
Message-ID: <87v850t7nz.fsf@gmail.com> (raw)
When `key-translate' was added, it didnʼt cover all the cases that
`keyboard-translate' does.
Add a translation:
(keyboard-translate ?\C-a ?\C-z)
Two ways to remove, of which I submit the first is 'obvious':
(keyboard-translate ?\C-a nil)
(keyboard-translate ?\C-a ?\C-a)
Add:
(key-translate "C-a" "C-z")
This works for removing a translation but is non-obvious:
(key-translate "C-a" "C-a")
But this doesnʼt:
(key-translate "C-a" nil)
=>
Debugger entered--Lisp error: (error "nil is not a valid key definition; see ‘key-valid-...")
signal(error ("nil is not a valid key definition; see ‘key-valid-..."))
error("%S is not a valid key definition; see `key-valid-p..." nil)
Iʼm not sure this is worth fixing, but perhaps documenting that
re-adding the same translation is (almost) the same as removing it?
Thanks
Robert
In GNU Emacs 29.3.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version
3.24.38, cairo version 1.16.0) of 2024-04-02 built on rltb
Repository revision: 6b8b0a12333afeadb32744ba481679b05b758ed2
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
System Description: Debian GNU/Linux 12 (bookworm)
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB
--
next reply other threads:[~2024-04-02 9:50 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-02 9:50 Robert Pluim [this message]
2024-04-02 14:21 ` bug#70139: [PATCH] Improve key-translate to support removing translations Charalampos Mitrodimas
2024-04-02 14:28 ` bug#70139: 29.3.50; key-translate does not support all keyboard-translate usages Charalampos Mitrodimas
2024-04-02 15:41 ` Robert Pluim
2024-04-02 19:02 ` bug#70139: [PATCH] Improve key-translate to support removing translations Charalampos Mitrodimas
2024-04-04 13:00 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-04 19:48 ` Charalampos Mitrodimas
2024-04-04 21:53 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-06 17:09 ` Charalampos Mitrodimas
2024-04-06 17:18 ` Charalampos Mitrodimas
2024-04-07 14:45 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-09 11:14 ` Charalampos Mitrodimas
2024-04-09 12:57 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-09 13:07 ` Charalampos Mitrodimas
2024-04-13 9:19 ` Eli Zaretskii
2024-04-13 12:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-13 16:02 ` Eli Zaretskii
2024-04-14 21:31 ` Charalampos Mitrodimas
2024-04-15 2:30 ` Eli Zaretskii
2024-05-20 20:39 ` Charalampos Mitrodimas
2024-05-23 13:25 ` Eli Zaretskii
2024-04-04 12:27 ` bug#70139: 29.3.50; key-translate does not support all keyboard-translate usages Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v850t7nz.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=70139@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.