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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 70139 in the body.
You can then email your comments to 70139 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#70139; Package emacs. (Tue, 02 Apr 2024 09:52:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Pluim <rpluim <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 02 Apr 2024 09:52:04 GMT) Full text and rfc822 format available.

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

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Tue, 02 Apr 2024 15:43:01 GMT) Full text and rfc822 format available.

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

From: Robert Pluim <rpluim <at> gmail.com>
To: Charalampos Mitrodimas <charmitro <at> posteo.net>
Cc: 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: 29.3.50; key-translate does not support all
 keyboard-translate usages
Date: Tue, 02 Apr 2024 17:41:47 +0200
>>>>> On Tue,  2 Apr 2024 14:28:47 +0000, Charalampos Mitrodimas <charmitro <at> posteo.net> said:

The patch looks ok, it needs a ChangeLog entry style commit message
though (see the "** Commit messages" and "** Generating ChangeLog
entries" sections of CONTRIBUTE).

For extra credit, update the emacs lisp manual entry for
`key-translate' :-)

    Charalampos> From 4c35e45c128d8ad0c93ac787fe51eecbcd570286 Mon Sep 17 00:00:00 2001
    Charalampos> From: Charalampos Mitrodimas <charmitro <at> posteo.net>
    Charalampos> Date: Tue, 2 Apr 2024 17:20:44 +0300
    Charalampos> Subject: [PATCH] Improve key-translate to support removing translations

    Charalampos> This patch enhances the key-translate function to allow removing
    Charalampos> keyboard translations by passing nil as the second argument (TO).

    Charalampos> If TO is nil, any existing translation for the FROM key will be removed.
    Charalampos> The compiler macro is updated to only check TO when it is non-nil.

    Charalampos> This change makes key-translate more consistent with the behavior of
    Charalampos> keyboard-translate, providing a way to remove translations without
    Charalampos> having to specify the same key for both FROM and TO.

    Charalampos> The documentation string is updated to reflect the new behavior.

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Tue, 02 Apr 2024 16:02:02 GMT) Full text and rfc822 format available.

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

From: Charalampos Mitrodimas <charmitro <at> posteo.net>
To: 70139 <at> debbugs.gnu.org
Cc: Charalampos Mitrodimas <charmitro <at> posteo.net>
Subject: [PATCH] Improve key-translate to support removing translations
Date: Tue,  2 Apr 2024 14:21:50 +0000
This patch enhances the key-translate function to allow removing
keyboard translations by passing nil as the second argument (TO).

If TO is nil, any existing translation for the FROM key will be removed.
The compiler macro is updated to only check TO when it is non-nil.

This change makes key-translate more consistent with the behavior of
keyboard-translate, providing a way to remove translations without
having to specify the same key for both FROM and TO.

The documentation string is updated to reflect the new behavior.
---
 lisp/keymap.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/keymap.el b/lisp/keymap.el
index b2b475c7d71..1481f1fe72b 100644
--- a/lisp/keymap.el
+++ b/lisp/keymap.el
@@ -382,17 +382,19 @@ key-translate
 This function creates a `keyboard-translate-table' if necessary
 and then modifies one entry in it.
 
-Both FROM and TO should be specified by strings that satisfy `key-valid-p'."
+Both FROM and TO should be specified by strings that satisfy `key-valid-p'.
+If TO is nil, remove any existing translation for FROM."
   (declare (compiler-macro
-            (lambda (form) (keymap--compile-check from to) form)))
+            (lambda (form) (keymap--compile-check from (and to to)) form)))
   (keymap--check from)
-  (keymap--check to)
+  (when to
+    (keymap--check to))
   (or (char-table-p keyboard-translate-table)
       (setq keyboard-translate-table
             (make-char-table 'keyboard-translate-table nil)))
   (aset keyboard-translate-table
         (aref (key-parse from) 0)
-        (aref (key-parse to) 0)))
+        (and to (aref (key-parse to) 0))))
 
 (defun keymap-lookup (keymap key &optional accept-default no-remap position)
   "Return the binding for command KEY in KEYMAP.
-- 
2.34.1





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Tue, 02 Apr 2024 16:02:03 GMT) Full text and rfc822 format available.

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

From: Charalampos Mitrodimas <charmitro <at> posteo.net>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: 29.3.50; key-translate does not support all
 keyboard-translate usages
Date: Tue,  2 Apr 2024 14:28:47 +0000
[Message part 1 (text/plain, inline)]
On 4/2/24 12:50, Robert Pluim wrote:
> 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

I accidentally sent the patch the wrong way (newcomer here), attaching here.

--
Charalampos Mitrodimas
[0001-Improve-key-translate-to-support-removing-translatio.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Tue, 02 Apr 2024 19:04:02 GMT) Full text and rfc822 format available.

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

From: Charalampos Mitrodimas <charmitro <at> posteo.net>
To: 70139 <at> debbugs.gnu.org
Cc: Charalampos Mitrodimas <charmitro <at> posteo.net>
Subject: [PATCH] Improve key-translate to support removing translations
Date: Tue,  2 Apr 2024 19:02:46 +0000
This patch enhances the key-translate function to allow removing
keyboard translations by passing nil as the second argument (TO).

If TO is nil, any existing translation for the FROM key will be removed.
The compiler macro is updated to only check TO when it is non-nil.

This change makes key-translate more consistent with the behavior of
keyboard-translate, providing a way to remove translations without
having to specify the same key for both FROM and TO.

The documentation string is updated to reflect the new behavior.

* lisp/keymap.el (key-translate): support removing translations by
  passing nil as the second argument (TO). (Bug#70139)
---
 lisp/keymap.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/keymap.el b/lisp/keymap.el
index b2b475c7d71..1481f1fe72b 100644
--- a/lisp/keymap.el
+++ b/lisp/keymap.el
@@ -382,17 +382,19 @@ key-translate
 This function creates a `keyboard-translate-table' if necessary
 and then modifies one entry in it.
 
-Both FROM and TO should be specified by strings that satisfy `key-valid-p'."
+Both FROM and TO should be specified by strings that satisfy `key-valid-p'.
+If TO is nil, remove any existing translation for FROM."
   (declare (compiler-macro
-            (lambda (form) (keymap--compile-check from to) form)))
+            (lambda (form) (keymap--compile-check from (and to to)) form)))
   (keymap--check from)
-  (keymap--check to)
+  (when to
+    (keymap--check to))
   (or (char-table-p keyboard-translate-table)
       (setq keyboard-translate-table
             (make-char-table 'keyboard-translate-table nil)))
   (aset keyboard-translate-table
         (aref (key-parse from) 0)
-        (aref (key-parse to) 0)))
+        (and to (aref (key-parse to) 0))))
 
 (defun keymap-lookup (keymap key &optional accept-default no-remap position)
   "Return the binding for command KEY in KEYMAP.
-- 
2.34.1





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Thu, 04 Apr 2024 12:28:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Robert Pluim <rpluim <at> gmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: 29.3.50;
 key-translate does not support all keyboard-translate usages
Date: Thu, 04 Apr 2024 15:27:39 +0300
> From: Robert Pluim <rpluim <at> gmail.com>
> 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?

Stefan, any comments or suggestions?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Thu, 04 Apr 2024 13:01:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Charalampos Mitrodimas <charmitro <at> posteo.net>
Cc: 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
Date: Thu, 04 Apr 2024 09:00:31 -0400
I don't have much to say about this bug report or the fix for it, I'm
not very familiar with the `keyboard-translate-table` part of our
input processing.

>    (aset keyboard-translate-table
>          (aref (key-parse from) 0)
> -        (aref (key-parse to) 0)))
> +        (and to (aref (key-parse to) 0))))

But here, I think that, in keeping with the tradition of the `key-*`
functions, we should signal an error if `key-parse` returns an array
longer than 1 element, instead of just using the first element and
silently dropping the rest on the floor.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Thu, 04 Apr 2024 19:49:04 GMT) Full text and rfc822 format available.

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

From: Charalampos Mitrodimas <charmitro <at> posteo.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
Date: Thu,  4 Apr 2024 19:48:16 +0000
Hi,

Thanks for your review, much appreciated.

On 4/4/24 4:00 PM, Stefan Monnier via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> I don't have much to say about this bug report or the fix for it, I'm
> not very familiar with the `keyboard-translate-table` part of our
> input processing.
>
>>     (aset keyboard-translate-table
>>           (aref (key-parse from) 0)
>> -        (aref (key-parse to) 0)))
>> +        (and to (aref (key-parse to) 0))))
> But here, I think that, in keeping with the tradition of the `key-*`
> functions, we should signal an error if `key-parse` returns an array
> longer than 1 element, instead of just using the first element and
> silently dropping the rest on the floor.
>
>
>          Stefan

Just to clarify, are you referring to something like this?

    (key-translate "C-x" "C-z" "C-a")


--
Charalampos





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Thu, 04 Apr 2024 21:54:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Charalampos Mitrodimas <charmitro <at> posteo.net>
Cc: 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
Date: Thu, 04 Apr 2024 17:53:33 -0400
> Just to clarify, are you referring to something like this?
>
>     (key-translate "C-x" "C-z" "C-a")

No, rather (key-translate "C-a C-z" "C-x b")


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Sat, 06 Apr 2024 17:11:02 GMT) Full text and rfc822 format available.

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

From: Charalampos Mitrodimas <charmitro <at> posteo.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
Date: Sat, 06 Apr 2024 17:09:56 +0000
[Message part 1 (text/plain, inline)]
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> Just to clarify, are you referring to something like this?
>>
>>     (key-translate "C-x" "C-z" "C-a")
>
> No, rather (key-translate "C-a C-z" "C-x b")
>
>
>         Stefan

Thanks for clarifying this! Updated patch attached.

[0001-Improve-key-translate-to-support-removing-translatio.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
--
Charalampos

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Sat, 06 Apr 2024 17:19:02 GMT) Full text and rfc822 format available.

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

From: Charalampos Mitrodimas <charmitro <at> posteo.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
Date: Sat, 06 Apr 2024 17:18:29 +0000
[Message part 1 (text/plain, inline)]
Charalampos Mitrodimas <charmitro <at> posteo.net> writes:

> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>
>>> Just to clarify, are you referring to something like this?
>>>
>>>     (key-translate "C-x" "C-z" "C-a")
>>
>> No, rather (key-translate "C-a C-z" "C-x b")
>>
>>
>>         Stefan
>
> Thanks for clarifying this! Updated patch attached.
>
> [2. patch --- text/x-patch; 0001-Improve-key-translate-to-support-removing-translatio.patch]...

Apologies, wrong patch. Attaching the correct one :-)

--
Charalampos

[0001-Improve-key-translate-to-support-removing-translatio.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Sun, 07 Apr 2024 14:46:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Charalampos Mitrodimas <charmitro <at> posteo.net>
Cc: 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
Date: Sun, 07 Apr 2024 10:45:28 -0400
> +            (lambda (form) (keymap--compile-check from (and to to)) form)))
                                                          ^^^^^^^^^^^
                                                          ??

>    (keymap--check from)
> -  (keymap--check to)
> -  (or (char-table-p keyboard-translate-table)
> -      (setq keyboard-translate-table
> -            (make-char-table 'keyboard-translate-table nil)))
> -  (aset keyboard-translate-table
> -        (aref (key-parse from) 0)
> -        (aref (key-parse to) 0)))
> +  (when to
> +    (keymap--check to))
> +  (let ((from-key (key-parse from))
> +        (to-key (and to (key-parse to))))
> +    (when (> (length from-key) 1)
> +      (error "FROM key %s is not a single key" from))
> +    (when (and to (> (length to-key) 1))
> +      (error "TO key %s is not a single key" to))

I'd check `=` while at it (if length is 0 the error is caught by
`aref`, but it's a less helpful error).


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Tue, 09 Apr 2024 11:15:02 GMT) Full text and rfc822 format available.

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

From: Charalampos Mitrodimas <charmitro <at> posteo.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
Date: Tue,  9 Apr 2024 11:14:34 +0000
[Message part 1 (text/plain, inline)]
On 4/7/24 17:45, Stefan Monnier wrote:
>> +            (lambda (form) (keymap--compile-check from (and to to)) form)))
>                                                            ^^^^^^^^^^^
>                                                            ??
>
>>     (keymap--check from)
>> -  (keymap--check to)
>> -  (or (char-table-p keyboard-translate-table)
>> -      (setq keyboard-translate-table
>> -            (make-char-table 'keyboard-translate-table nil)))
>> -  (aset keyboard-translate-table
>> -        (aref (key-parse from) 0)
>> -        (aref (key-parse to) 0)))
>> +  (when to
>> +    (keymap--check to))
>> +  (let ((from-key (key-parse from))
>> +        (to-key (and to (key-parse to))))
>> +    (when (> (length from-key) 1)
>> +      (error "FROM key %s is not a single key" from))
>> +    (when (and to (> (length to-key) 1))
>> +      (error "TO key %s is not a single key" to))
> I'd check `=` while at it (if length is 0 the error is caught by
> `aref`, but it's a less helpful error).
>
>
>          Stefan

Updated & attached.

--
Charalampos
[0001-Improve-key-translate-to-support-removing-translatio.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Tue, 09 Apr 2024 12:58:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Charalampos Mitrodimas <charmitro <at> posteo.net>
Cc: 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
Date: Tue, 09 Apr 2024 08:57:13 -0400
> -            (lambda (form) (keymap--compile-check from to) form)))
> +            (lambda (form) (keymap--compile-check from (if to to nil)) form)))
                                                          ^^^^^^^^^^^^^^

??

Just like (and to to), this is just a complicated way to say `to`.
What is the underlying idea?


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Tue, 09 Apr 2024 13:09:02 GMT) Full text and rfc822 format available.

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

From: Charalampos Mitrodimas <charmitro <at> posteo.net>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
Date: Tue,  9 Apr 2024 13:07:50 +0000
[Message part 1 (text/plain, inline)]
On 4/9/24 15:57, Stefan Monnier via Bug reports for GNU Emacs, the Swiss 
army knife of text editors wrote:
>> -            (lambda (form) (keymap--compile-check from to) form)))
>> +            (lambda (form) (keymap--compile-check from (if to to nil)) form)))
>                                                            ^^^^^^^^^^^^^^
>
> ??
>
> Just like (and to to), this is just a complicated way to say `to`.
> What is the underlying idea?

I was trying to pass nil to keymap--compile-check but I was complicating 
this for no reason. Reverted it completely, apologies.
[0001-Improve-key-translate-to-support-removing-translatio.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Sat, 13 Apr 2024 09:21:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Charalampos Mitrodimas <charmitro <at> posteo.net>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
Date: Sat, 13 Apr 2024 12:19:48 +0300
> Date: Tue,  9 Apr 2024 13:07:50 +0000
> From: Charalampos Mitrodimas <charmitro <at> posteo.net>
> 
> On 4/9/24 15:57, Stefan Monnier via Bug reports for GNU Emacs, the Swiss 
> army knife of text editors wrote:
> >> -            (lambda (form) (keymap--compile-check from to) form)))
> >> +            (lambda (form) (keymap--compile-check from (if to to nil)) form)))
> >                                                            ^^^^^^^^^^^^^^
> >
> > ??
> >
> > Just like (and to to), this is just a complicated way to say `to`.
> > What is the underlying idea?
> 
> I was trying to pass nil to keymap--compile-check but I was complicating 
> this for no reason. Reverted it completely, apologies.

Stefan, any further comments, or is this ready to be installed?

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.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Sat, 13 Apr 2024 12:47:03 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Charalampos Mitrodimas <charmitro <at> posteo.net>, 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
Date: Sat, 13 Apr 2024 08:46:16 -0400
>> I was trying to pass nil to keymap--compile-check but I was complicating 
>> this for no reason. Reverted it completely, apologies.
>
> Stefan, any further comments, or is this ready to be installed?

Ready for me, thanks.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Sat, 13 Apr 2024 16:03:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: charmitro <at> posteo.net, 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
Date: Sat, 13 Apr 2024 19:02:10 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: Charalampos Mitrodimas <charmitro <at> posteo.net>,  70139 <at> debbugs.gnu.org
> Date: Sat, 13 Apr 2024 08:46:16 -0400
> 
> >> I was trying to pass nil to keymap--compile-check but I was complicating 
> >> this for no reason. Reverted it completely, apologies.
> >
> > Stefan, any further comments, or is this ready to be installed?
> 
> Ready for me, thanks.

OK, so we are waiting for the legal paperwork, and then we can
install.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Sun, 14 Apr 2024 21:33:03 GMT) Full text and rfc822 format available.

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

From: Charalampos Mitrodimas <charmitro <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
Date: Sun, 14 Apr 2024 21:31:37 +0000

> On 13 Apr 2024, at 12:21 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
> 
>> 
>> Date: Tue,  9 Apr 2024 13:07:50 +0000
>> From: Charalampos Mitrodimas <charmitro <at> posteo.net>
>> 
>> On 4/9/24 15:57, Stefan Monnier via Bug reports for GNU Emacs, the Swiss
>> army knife of text editors wrote:
>>>> -            (lambda (form) (keymap--compile-check from to) form)))
>>>> +            (lambda (form) (keymap--compile-check from (if to to nil)) form)))
>>>                                                           ^^^^^^^^^^^^^^
>>> 
>>> ??
>>> 
>>> Just like (and to to), this is just a complicated way to say `to`.
>>> What is the underlying idea?
>> 
>> I was trying to pass nil to keymap--compile-check but I was complicating
>> this for no reason. Reverted it completely, apologies.
> 
> Stefan, any further comments, or is this ready to be installed?
> 
> 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. 

Thanks!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Mon, 15 Apr 2024 02:31:03 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Charalampos Mitrodimas <charmitro <at> posteo.net>
Cc: 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
Date: Mon, 15 Apr 2024 05:30:20 +0300
> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70139; Package emacs. (Mon, 20 May 2024 20:40:02 GMT) Full text and rfc822 format available.

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

From: Charalampos Mitrodimas <charmitro <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
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.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 23 May 2024 13:26:02 GMT) Full text and rfc822 format available.

Notification sent to Robert Pluim <rpluim <at> gmail.com>:
bug acknowledged by developer. (Thu, 23 May 2024 13:26:02 GMT) Full text and rfc822 format available.

Message #70 received at 70139-done <at> debbugs.gnu.org (full text, mbox):

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.




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

This bug report was last modified 34 days ago.

Previous Next


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