Subject: bug#70139: closed (Re: bug#70139: [PATCH] Improve key-translate to support removing translations)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 23 May 2024 13:26:02 +0000

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 [email-masked].

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

Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing translations
From: Eli Zaretskii <[email-masked]>
To: Charalampos Mitrodimas <[email-masked]>
Cc: [email-masked]
Date: Thu, 23 May 2024 16:25:04 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Charalampos Mitrodimas <[email-masked]>
> Cc: [email-masked]
> Date: Mon, 20 May 2024 20:39:27 +0000
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> From: Charalampos Mitrodimas <[email-masked]>
> >> Date: Sun, 14 Apr 2024 21:31:37 +0000
> >> Cc: [email-masked]
> >> 
> >> > 
> >> > 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.

Subject: 29.3.50; key-translate does not support all keyboard-translate usages
From: Robert Pluim <[email-masked]>
To: [email-masked]
Date: Tue, 02 Apr 2024 11:50:40 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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