From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Charalampos Mitrodimas Newsgroups: gmane.emacs.bugs Subject: bug#70139: [PATCH] Improve key-translate to support removing translations Date: Thu, 4 Apr 2024 19:48:16 +0000 Message-ID: References: <87v850t7nz.fsf@gmail.com> <20240402190246.1824023-1-charmitro@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21233"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70139@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 04 21:49:51 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rsT5r-0005J1-8m for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Apr 2024 21:49:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsT55-0006wJ-Gr; Thu, 04 Apr 2024 15:49:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rsT52-0006sy-9a for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2024 15:49:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsT51-0000Wq-Vn for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2024 15:49:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rsT56-00058V-9e for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2024 15:49:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Charalampos Mitrodimas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Apr 2024 19:49:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70139 X-GNU-PR-Package: emacs Original-Received: via spool by 70139-submit@debbugs.gnu.org id=B70139.171226011519464 (code B ref 70139); Thu, 04 Apr 2024 19:49:04 +0000 Original-Received: (at 70139) by debbugs.gnu.org; 4 Apr 2024 19:48:35 +0000 Original-Received: from localhost ([127.0.0.1]:34736 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsT4b-00053d-L8 for submit@debbugs.gnu.org; Thu, 04 Apr 2024 15:48:35 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:36593) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsT4Y-000526-G9 for 70139@debbugs.gnu.org; Thu, 04 Apr 2024 15:48:31 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id DD207240101 for <70139@debbugs.gnu.org>; Thu, 4 Apr 2024 21:48:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1712260098; bh=SDGrwq4oSpgBLBQuUbcYcLqMLhqizNcok31zgDYcMhk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:Content-Type: Content-Transfer-Encoding:From; b=UNtVgKD4hRREXLTTmiQzZoQjpvGi0/nMoYbM9T5chpu1POIB9C47NkHEj04ZVZWh6 S/CG1zGL4SAscml71zi7yhqioRMy7gmA8QOwoAWCCxr4TTo8Gry+FnY+P1p/vpNjfn 7QHEWXvJfQYZMgJBD4rx6dPF83LkJj4rkaajwmyCtiiOr1D8MfyiF8DT5r/og5nmXv nEHg08kM1RvOZ1/O4r2PL615MxB9HIBli/nh5zH9U9DUo60gjJ14xR4xTzu/Qo9W8w /thRYkPKFRV4DA+9bm3eb5bbED0pwVcaZuqDW3OaW5aQd0cv8nROWJLyUmsPdLWaSx sLX4KU6goSLUQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V9XGp0MxTz9rxG; Thu, 4 Apr 2024 21:48:17 +0200 (CEST) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282678 Archived-At: 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