From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#55842: 29.0.50; Using shorthand syntax in keymap-global-set Date: Thu, 09 Jun 2022 19:08:42 +0300 Message-ID: <83czfh3jlh.fsf@gnu.org> References: <86czfjlc4r.fsf@gnu.org> <874k0u55a1.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32363"; mail-complaints-to="usenet@ciao.gmane.io" Cc: arash@gnu.org, 55842@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 09 18:36:03 2022 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 1nzL8c-0008Ck-3E for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 18:36:02 +0200 Original-Received: from localhost ([::1]:33332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzL8b-0007Cp-1M for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 12:36:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzKiU-0002rV-E5 for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 12:09:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzKiU-0000CI-3m for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 12:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzKiT-0002Cp-NY for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 12:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jun 2022 16:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55842 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 55842-submit@debbugs.gnu.org id=B55842.16547909338461 (code B ref 55842); Thu, 09 Jun 2022 16:09:01 +0000 Original-Received: (at 55842) by debbugs.gnu.org; 9 Jun 2022 16:08:53 +0000 Original-Received: from localhost ([127.0.0.1]:47501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzKiK-0002CP-S6 for submit@debbugs.gnu.org; Thu, 09 Jun 2022 12:08:53 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzKiJ-0002CD-EP for 55842@debbugs.gnu.org; Thu, 09 Jun 2022 12:08:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzKiD-0000BH-WD; Thu, 09 Jun 2022 12:08:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=nJYXWaXKGmzmy51BxUqBCs1iBl4jDVoCYE7aazvMfGA=; b=dJRPCVu3aBLQ /SqyZgyUweyMVJuEseMkCtvg4hdGwVcMO6EuPnG+OmFT6SjWc68I5KuOXiMcGbzdVfIbteFrF7m+L t7ldQCiLKhxVO6CE1EkM/Q6yNg7rDFDDkk5PepYaXTXUxgkajZdXQhQgMQ3pwznfLWdhDsoJEbhkj VM3OAB/YhMUgD6PTOotpKGIqcBkqEYvNYF6+eIH+1K1ll1XTZwGCFu66ZJloCWZzdM4fLA1qqBwrz IQliI3j1pP7vyd7+/qlCgjNToba192IB4D6tSSWJGwTP9RUxAgvH6C4sJXbJ8ExOYPOz6Lvn8mz9s J36r5w7+aHy7IIKsflfMEg==; Original-Received: from [87.69.77.57] (port=1493 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzKiD-00020P-Ch; Thu, 09 Jun 2022 12:08:45 -0400 In-Reply-To: <874k0u55a1.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 09 Jun 2022 15:35:02 +0200) 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" Xref: news.gmane.io gmane.emacs.bugs:234117 Archived-At: > Cc: 55842@debbugs.gnu.org > From: Lars Ingebrigtsen > Date: Thu, 09 Jun 2022 15:35:02 +0200 > > > 1. emacs -Q > > 2. In scratch, eval (key-valid-p "C-TAB") => t > > 3. In scratch, eval (keymap-global-set "C-TAB" #'other-window) > > 4. Try 'C-h k Ctrl-Tab' => C- is undefined > > 5. In scratch, eval (keymap-global-set "C-" #'other-window) > > 6. 'C-h k Ctrl-Tab' returns the expected result. > > > > Am I missing something about shorthands? Reading the docstring of > > `key-valid-p', I thought the item 3. above should also work. > > TAB is a complicated issue in Emacs, unfortunately. > > "C-TAB" is just a different way to write "C-i", because TAB and C-i are > the same in most terminals. > > If you want to bind the C- key stroke, you have to specify it as > such. (And it won't work in most terminals, only in GUI Emacs.) > > (key-valid-p "C-TAB") could signal an error to help lessen the > confusion, I guess? (And C-RET and C-LFD.) Anybody got an opinion > here? Without thinking about this too much, my opinion is that if the new APIs are to be the replacement for the obsolete ones, they had better supported the same syntax, because I don't believe there's a single Emacs user out there who doesn't have some key bindings in their init files. If the syntax is incompatible, how can we ever convince the majority to switch?