From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: hugo@heagren.com Newsgroups: gmane.emacs.bugs Subject: bug#72460: [patch] add commands for setting keyboard translations interactively Date: Sun, 04 Aug 2024 13:16:29 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_fb3e12df896daec6f068e4a6fdad815d" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23304"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Roundcube Webmail/1.6.6 To: 72460@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 04 14:18:05 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 1saaBX-0005vn-FA for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Aug 2024 14:18:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1saaBF-0004lC-UR; Sun, 04 Aug 2024 08:17:45 -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 1saaBE-0004l3-DC for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2024 08:17:44 -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 1saaBC-0004M1-Lp for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2024 08:17:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=From:Date:MIME-Version:To:Subject; bh=2JXDXp4jIaLs4AxvayS1YEjfDCqxJLqw1dIiaxtRHjc=; b=v0gSnwgGdHd1s9H19PBNVXgeML2zDHB+97wEPXKSkPdR97+4QV/SJV1E8JlK4P53mmVrxO6Wwr8eKiOEawQKeJ2yznIaKDyCNE/j9Kw5RflrEEdz5s/8KIcWek/Qd9CU8kteOu1dikBn3NIIBpAOsVEsr9q5jnQ/LbrIAE0+7zO9PhA1+UlkLMlqsryMH+4LzCT9mU2Oz1U8CexJQKAHVoulp+3298/rnbOR7cJZkcRT9oPGoOsEokPZlu9Cr3XpOcEvWTuq7YhjKkuvQc/ECvEiA10muPQ+T7lDUZGX/D3UEN41Mwk8FHk6hi1o64y/O6U7DiS9AdM/zngtBeAiog==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1saaBW-000266-Jl for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2024 08:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: hugo@heagren.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Aug 2024 12:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72460 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17227738628000 (code B ref -1); Sun, 04 Aug 2024 12:18:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Aug 2024 12:17:42 +0000 Original-Received: from localhost ([127.0.0.1]:55604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saaBB-00024x-EE for submit@debbugs.gnu.org; Sun, 04 Aug 2024 08:17:41 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:47298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saaB9-00024o-N4 for submit@debbugs.gnu.org; Sun, 04 Aug 2024 08:17:40 -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 1saaAo-0004iT-BP for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2024 08:17:18 -0400 Original-Received: from whuk14.whukhost.com ([5.77.41.174]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1saaAm-0004BA-AM for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2024 08:17:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=heagren.com ; s=default; h=Content-Type:Message-ID:Subject:To:From:Date:MIME-Version: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=2JXDXp4jIaLs4AxvayS1YEjfDCqxJLqw1dIiaxtRHjc=; b=qzaMt4mMyAVgoNos33ITh+aSVJ mi7+83AL0br3OenjOooNupKqWes58zqfYseQ6TZBbl8uCziH+03PgGjz84SCoq0ctzhSR3NZUiSKG cXHi+b6T+HNg6LriDkjiRAhSlB28JcMwMLJwX7SDMa8cUBK05E+a/7SG3w+s/W8WFbJKYtrbJ1bYm vAVV90R9xiDjuyVdbwIICEs1T2bgsCG1n0+95DZMI2qYdsXZER2g8AmPXEAK3lEjWqCkyAfsobw/n I7TzmcP8ISNHStspAArTiRn48FBKwGciiuY2jlxyJF/8hJVFAnxBB4vPyPCrT3yW6ZPNDtWWTNl+8 4cRfyitw==; Original-Received: from [::1] (port=42772 helo=whuk14.whukhost.com) by whuk14.whukhost.com with esmtpa (Exim 4.97.1) (envelope-from ) id 1saaA3-00000000cLa-1oyU for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2024 13:16:31 +0100 X-Sender: hugo@heagren.com X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - whuk14.whukhost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - heagren.com X-Get-Message-Sender-Via: whuk14.whukhost.com: authenticated_id: hugo@heagren.com X-Authenticated-Sender: whuk14.whukhost.com: hugo@heagren.com Received-SPF: pass client-ip=5.77.41.174; envelope-from=hugo@heagren.com; helo=whuk14.whukhost.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:289747 Archived-At: --=_fb3e12df896daec6f068e4a6fdad815d Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Dear all, The attached patch adds commands for adding and removing entries in `keyboard-translate-table' interactively: - add an interactive spec to `key-translate' - add a new command `key-translate-remove', which does the opposite of `key-translate'. - add an option for users to customise how the latter function prompts for which from/to pair is removed. The default just lists them with `completing-read'. I find this sort of thing useful for cases where I want to use something other than space as a word separator (e.g. when typing lots of function names), or when for a long period I want to use the symbol which is usually on the shift of a key (i.e. I know I want to type "+" a lot, but not "="). The patch doesn't contain a NEWS entry yet -- I wanted to get the greenlight on the code first. Best, Hugo --=_fb3e12df896daec6f068e4a6fdad815d Content-Transfer-Encoding: base64 Content-Type: text/x-diff; name=0001-Add-commands-to-interactively-set-unset-keyboard-tra.patch Content-Disposition: attachment; filename=0001-Add-commands-to-interactively-set-unset-keyboard-tra.patch; size=3772 RnJvbSBiNWIwZDZlNGM1M2ZjZWRlYTkyZGYwM2U4NmM1N2FmODU2YzlmYmI3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBIdWdvIEhlYWdyZW4gPGh1Z29AaGVhZ3Jlbi5jb20+CkRhdGU6 IFN1biwgNCBBdWcgMjAyNCAxMjo1NDoyNyArMDEwMApTdWJqZWN0OiBbUEFUQ0hdIEFkZCBjb21t YW5kcyB0byBpbnRlcmFjdGl2ZWx5IHNldC91bnNldCBrZXlib2FyZCB0cmFuc2xhdGlvbnMKCiog bGlzcC9rZXltYXAuZWwgKGtleS10cmFuc2xhdGUpOiBBZGQgYW4gaW50ZXJhY3RpdmUgZm9ybSwg cHJvbXB0aW5nIGZvcgprZXlzIHRvIHRyYW5zbGF0ZSwgYW5kIHVwZGF0ZSBkb2NzdHJpbmcgdG8g cmVmbGVjdCB0aGlzLgooa2V5LXRyYW5zbGF0ZS1zZWxlY3Rpb24tZnVuY3Rpb24pOiBOZXcgY3Vz dG9tIG9wdGlvbi4KKGtleS1zZWxlY3QtdHJhbnNsYXRpb24pOiBOZXcgZnVuY3Rpb24sIGRlZmF1 bHQgdmFsdWUgb2YgYWJvdmUgb3B0aW9uLgooa2V5LXRyYW5zbGF0ZS1yZW1vdmUpOiBOZXcgY29t bWFuZCwgZm9yIHJlbW92aW5nIGVudHJpZXMgZnJvbQpga2V5Ym9hcmQtdHJhbnNsYXRlLXRhYmxl Jy4KL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BUT1wiLiIKKyAgKGxl dCogKChtaW5pYnVmZmVyLWFsbG93LXRleHQtcHJvcGVydGllcyB0KQorICAgICAgICAgKGNvbGxl Y3Rpb24pCisgICAgICAgICA7OyBBbGlnbm1lbnQgaGVscGVycworICAgICAgICAgKHBhZCAwKQor ICAgICAgICAgKF8gKG1hcC1jaGFyLXRhYmxlCisgICAgICAgICAgICAgKGxhbWJkYSAoayBfKQor ICAgICAgICAgICAgICAgKHdoZW4gKD4gKGxlbmd0aCAoa2V5LWRlc2NyaXB0aW9uIGBbLGtdKSkg cGFkKQorICAgICAgICAgICAgICAgICAoc2V0cSBwYWQgKGxlbmd0aCAoa2V5LWRlc2NyaXB0aW9u IGBbLGtdKSkpKSkKKyAgICAgICAgICAgICBrZXlib2FyZC10cmFuc2xhdGUtdGFibGUKKyAgICAg ICAgICAgICApKQorICAgICAgICAgKGZvcm1hdC1mdW5jCisgICAgICAgICAgKGxhbWJkYSAoayB2 KQorICAgICAgICAgICAgKHNldHEgY29sbGVjdGlvbgorICAgICAgICAgICAgICAgICAgKGNvbnMK KyAgICAgICAgICAgICAgICAgICAocHJvcGVydGl6ZQorICAgICAgICAgICAgICAgICAgICAoZm9y bWF0CisgICAgICAgICAgICAgICAgICAgICAiJXMgLT4gJXMiCisgICAgICAgICAgICAgICAgICAg ICAoc3RyaW5nLXBhZCAoa2V5LWRlc2NyaXB0aW9uIGBbLGtdKSBwYWQpCisgICAgICAgICAgICAg ICAgICAgICAoa2V5LWRlc2NyaXB0aW9uIGBbLHZdKSkKKyAgICAgICAgICAgICAgICAgICAgJ2tl eS10cmFuc2xhdGUtZnJvbSBgWyxrXSkKKyAgICAgICAgICAgICAgICAgICBjb2xsZWN0aW9uKSkp KSkKKyAgICA7OyBQb3B1bGF0ZSBjb2xsZWN0aW9uCisgICAgKG1hcC1jaGFyLXRhYmxlIGZvcm1h dC1mdW5jIGtleWJvYXJkLXRyYW5zbGF0ZS10YWJsZSkKKyAgICAoZ2V0LXRleHQtcHJvc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