From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Round-tripping key definitions Date: Sat, 13 Nov 2021 09:43:15 -0500 Message-ID: References: <875yswtzxh.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12973"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Emacs developers To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 13 15:44:15 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mluGM-00037Y-0m for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Nov 2021 15:44:14 +0100 Original-Received: from localhost ([::1]:48322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mluGK-0000RG-J3 for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Nov 2021 09:44:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41270) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mluFZ-0008D5-Rh for emacs-devel@gnu.org; Sat, 13 Nov 2021 09:43:25 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:16416) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mluFW-00057t-T1 for emacs-devel@gnu.org; Sat, 13 Nov 2021 09:43:24 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 1F14A100355; Sat, 13 Nov 2021 09:43:18 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 33F6C10018A; Sat, 13 Nov 2021 09:43:16 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1636814596; bh=MwDlSxu4uEoxb+G8h8Iie4hQ/oHLUV+9FE1dCzD2BIM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=fcEg7NcYMWROYhiL+zMwV0fGbUMAbI2T4tlTl88T9rJK0MC1zS9l8sr5GpnH3+3EG VOMmXTvlbA80qLe5uB5s1U//JnZiiE5w3O1aAxgg3uHgTISq4ZA279UzeNPE2WEflO b6kNqU00tVRkLWYAsVjNhZ3CEvbz6zXJgFKqpzNoERz7kOSNROB/6n23GlXzY/rGKv 2oXmODdXmZCj5MMGV5uIyguIGIW/tbz2OC773p7+pY15GqvfmZFpNKXQjF201wBVea FchXCZGgj41FH35iOEhkvH5Q1rWsdCrJgMEEmES6FS47qtlcsAtJTYOFlsuSoMnHx1 ska1hcRGisQ9g== Original-Received: from ceviche (modemcable034.207-20-96.mc.videotron.ca [96.20.207.34]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EC3581204BA; Sat, 13 Nov 2021 09:43:15 -0500 (EST) In-Reply-To: <875yswtzxh.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 13 Nov 2021 05:58:02 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:279320 Archived-At: > It'd be nice if doing a `describe-keymap' would output the same bindings > that we put in. I mean, on the same form. If you define a key as > "C-i", that function will describe the key as "TAB", for instance. (And > the person making that keymap may have meant C-i with "i" being a > mnemonic for something.) FWIW, I think the TAB/C-i, RET/C-m, ESC/C-[, DEL/C-? confusion should be fixed by really decoupling the two. Maybe one way to do that is to have a `function-key-map` fallback from `[?\C-i]` to `[TAB]` (so `?\C-i` and `tab` would be "equal partners" both of which default to falling back to the new `TAB` key). You say "for instance" above, but which confusing cases are there other than the four TAB/C-i, RET/C-m, ESC/C-[, DEL/C-? special cases? > `describe-keymap' could use the :bindings entry to look up the intended > syntax (and not output that element). > > Yeah! I think that should work? (We'd only add this entry if there's > any "ambiguous" keys in the map, so the impact wouldn't be noticeable, I > think.) > > Thank you for coming to my TED talk. Truly inspiring. A have a question: how would you define "ambiguous"? Stefan