GNU bug report logs - #70139
29.3.50; key-translate does not support all keyboard-translate usages

Previous Next

Package: emacs;

Reported by: Robert Pluim <rpluim <at> gmail.com>

Date: Tue, 2 Apr 2024 09:52:04 UTC

Severity: normal

Found in version 29.3.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Robert Pluim <rpluim <at> gmail.com>
Subject: bug#70139: closed (Re: bug#70139: [PATCH] Improve key-translate
 to support removing translations)
Date: Thu, 23 May 2024 13:26:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#70139: 29.3.50; key-translate does not support all keyboard-translate usages

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 70139 <at> debbugs.gnu.org.

-- 
70139: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70139
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Charalampos Mitrodimas <charmitro <at> posteo.net>
Cc: 70139-done <at> debbugs.gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
Date: Thu, 23 May 2024 16:25:04 +0300
> From: Charalampos Mitrodimas <charmitro <at> posteo.net>
> Cc: 70139 <at> debbugs.gnu.org
> Date: Mon, 20 May 2024 20:39:27 +0000
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> From: Charalampos Mitrodimas <charmitro <at> posteo.net>
> >> Date: Sun, 14 Apr 2024 21:31:37 +0000
> >> Cc: 70139 <at> debbugs.gnu.org
> >> 
> >> > 
> >> > Charalampos, would you like to start the legal paperwork of assigning
> >> > to the FSF the copyright for your contributions?  This contribution is
> >> > already slightly above the limit that we are allowed to accept without
> >> > a copyright assignment.  If you agree, I will send you the form to
> >> > fill and the instructions to go with it.
> >> 
> >> Yes I would like, as I’m planning to become more active as a contributor.
> >> 
> >> Please send it over. 
> >
> > Form sent off-list.
> 
> Legal paperwork is now signed and countersigned by the Free Software
> Foundation.

Thanks, I therefore installed the changes on the master branch, and
I'm closing this bug.

[Message part 3 (message/rfc822, inline)]
From: Robert Pluim <rpluim <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.3.50; key-translate does not support all keyboard-translate usages
Date: Tue, 02 Apr 2024 11:50:40 +0200
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
-- 



This bug report was last modified 1 year and 54 days ago.

Previous Next


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