From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Round-tripping key definitions Date: Sun, 14 Nov 2021 01:39:31 +0100 Message-ID: <87r1bjh8os.fsf@gnus.org> References: <875yswtzxh.fsf@gnus.org> <87o86ohzyv.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="23261"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 14 01:42:09 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 1mm3az-0005qw-Mx for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Nov 2021 01:42:09 +0100 Original-Received: from localhost ([::1]:58286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mm3ax-0005W3-Rl for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Nov 2021 19:42:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mm3YZ-0004hM-AS for emacs-devel@gnu.org; Sat, 13 Nov 2021 19:39:39 -0500 Original-Received: from [2a01:4f9:2b:f0f::2] (port=42298 helo=quimby.gnus.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mm3YX-0004Oh-OV for emacs-devel@gnu.org; Sat, 13 Nov 2021 19:39:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/OoUsp1O+d5lwFwBiF8N1UdcCdPkMPHkK41C0nM9wio=; b=tdDVPnRrdEHTjfSddnBwPBPJIE A/4HbUNzNDxKac8o7ebhJvkPlmzM9JtRjmLq0/cR1RS73pbLn4IQO5oTb9thg6026Tz9NajARrdyy Do1JNiGC4ofuJzZAAkD7FHKlByjIV7RgdFXChOyJsMorfAe72RcAJqV0HVC1jH7XUu54=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mm3YR-0005ai-K9; Sun, 14 Nov 2021 01:39:34 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAAAXNSR0IArs4c6QAAAAlQTFRF PEZFqbOn////C9F+/gAAAAFiS0dEAmYLfGQAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfl Cw4AHxYk3N18AAAAtklEQVQoz53SsQ7EIAgAUEhkd9D/0eS6awL//ysn2iJtbzqHhhdUUAvwz8js hS6uot+0IAMobYOkJ4OMMfeJAdsIF6gha0bgWvZCWVU98gKrwgktfE5a81AOse2wuwzYNO2BfkKe gBuyB3rQDYf1tlPXGWKzoyJH6HxeHY2gH1ox6JoWV/kkZdxuljqgp8Fr5663KZwY2u6yvFreqB9D 6sUyHUYXE4F4v0Ai9xz2J7hnmuAHwoy/b/Bi7ODUWv0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEt MTEtMTRUMDA6MzE6MjIrMDA6MDBZPCWDAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTExLTE0VDAw OjMxOjIyKzAwOjAwKGGdPwAAADh0RVh0aWNjOmNvcHlyaWdodABDb3B5cmlnaHQgKGMpIDE5OTgg SGV3bGV0dC1QYWNrYXJkIENvbXBhbnn5V3k3AAAAIXRFWHRpY2M6ZGVzY3JpcHRpb24Ac1JHQiBJ RUM2MTk2Ni0yLjFXrdpHAAAAJnRFWHRpY2M6bWFudWZhY3R1cmVyAElFQyBodHRwOi8vd3d3Lmll Yy5jaBx/AEwAAAA3dEVYdGljYzptb2RlbABJRUMgNjE5NjYtMi4xIERlZmF1bHQgUkdCIGNvbG91 ciBzcGFjZSAtIHNSR0JEU0ipAAAAAElFTkSuQmCC X-Now-Playing: The Notwist's _Vertigo Days_: "Al Sur (feat. Juana Molina)" In-Reply-To: (Stefan Monnier's message of "Sat, 13 Nov 2021 10:23:46 -0500") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a01:4f9:2b:f0f::2 (failed) Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 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, RCVD_IN_DNSWL_MED=-2.3, RDNS_NONE=0.793, 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:279365 Archived-At: Stefan Monnier writes: >> I thought I remembered somebody saying that that wasn't really feasible >> (at least not on terminals)? If it is, that'd be fantastic. > > And you believed that somebody? I'm very gullible. >>> 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). > > BTW, I haven't thought very hard about the impact in terms of > compatibility with existing code. Could you? >> But are those the only ones? Hm... I guess? > > That's the question: for those four, the solution you propose is an > incomplete solution to their problem, so if there aren't any others I'm > not very favorable to the idea (at least not before we investigate more > direct solutions (like the one I outlined) and conclude that we have to > live with the current problem). It's true that (key-description (kbd "C-m")) => "RET" is unsatisfactory, but the hacky solution would basically fix this whenever we know which keymap the "C-m" appears in (like in `C-h b' and the like). So, yes, it's incomplete, but it won't be very noticeable. After poking around some more, I think those four keys are the indeed the only ones that are problematic here. SPC is OK, NUL and LFD aren't used. By the way, I found this: (key-description (kbd "C-i")) => "TAB" (key-description (kbd "C-M-i")) => "C-M-i" That's probably a bug? The last one should probably be "M-TAB"? (equal (kbd "C-M-i") (kbd "M-TAB")) => t -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no