From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#59305: 29.0.50; keymap-global-set handling of string bindings different from global-set-key Date: Fri, 25 Nov 2022 00:25:34 -0800 Message-ID: References: <87edu3cml8.fsf@gmail.com> <874junfonc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22518"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 59305@debbugs.gnu.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 25 09:26:09 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 1oyU2C-0005fG-TA for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Nov 2022 09:26:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyU27-0006kQ-WA; Fri, 25 Nov 2022 03:26:04 -0500 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 1oyU26-0006k1-81 for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2022 03:26:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oyU25-00039C-Uo for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2022 03:26:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oyU25-0007lG-IB for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2022 03:26:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Nov 2022 08:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59305 X-GNU-PR-Package: emacs Original-Received: via spool by 59305-submit@debbugs.gnu.org id=B59305.166936474329808 (code B ref 59305); Fri, 25 Nov 2022 08:26:01 +0000 Original-Received: (at 59305) by debbugs.gnu.org; 25 Nov 2022 08:25:43 +0000 Original-Received: from localhost ([127.0.0.1]:33410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyU1m-0007ki-PZ for submit@debbugs.gnu.org; Fri, 25 Nov 2022 03:25:43 -0500 Original-Received: from mail-oa1-f49.google.com ([209.85.160.49]:42664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyU1k-0007kV-Ub for 59305@debbugs.gnu.org; Fri, 25 Nov 2022 03:25:41 -0500 Original-Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-142b72a728fso4362829fac.9 for <59305@debbugs.gnu.org>; Fri, 25 Nov 2022 00:25:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=RIkf/Bo7rk46+v9l7kODgWRsB/boVsUPGPBk3m8OqbA=; b=G1r+piO/hkBAAcKhmJiKQ/snTXz3HwjOjjteqvsZOQkdYH6LG4OpOYkd09YxclzDlc CCdrWi8/FAlMno7XIlIClEUCk3KdI0HFM26qnxoqhtJCjExT+kaskKeQ1AsQFhvqyK2x 7OkJsZEJLJVLz7R9Yfr5tMsu0Bl58UAwrnee1Ad1xJQ39RGrJHgu/g2oaCjQnDgnSzV0 DB/8bkL/MftLmDqPdeDRuZz7BoKRc9Dv92eo4d1PUM9BRRAuxtXAf6ZTDQ7BmeA+YTAj 5bxZcXgjDslwO8zbsL0yilpvTV4IMhpZIj9U4R2/CSqS4jS5EjD8ZgkWAFgc9z3WO7rs GeKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=RIkf/Bo7rk46+v9l7kODgWRsB/boVsUPGPBk3m8OqbA=; b=4sKIoB86+rkFsibbJTeu166ZfBnLHZszcGYScfLu7oT76dXCQX5mXtCqNGO8UNsPw2 1+HXquU5tQSZsg6BnW4QJ/aro+F+cD4xQeqbtbMk8Iv/kx4+2IX2FJtO87Gt0a0sJdoY VU/f1jYk73ysZ9K21FnY7GSSd9oTKunzCi8WaOIkv62ojwExbeAazFc8jhQJZKs/KdL3 YEv0okMou10NL5nd0YQ2O7WNVaBkGIY1E9BA5OsDzX6lZaWEFuOS9vr/Q/Jik7YcJtZy ka3Wbcwc9CSBIgG65SfU6qRVHuHs27AFkw5aVy0GVGxd0XFKJvINAwh7Apa7WjeIrorU pMwg== X-Gm-Message-State: ANoB5pkbdi6mZnrZlJAziLuRntqpBJZd/buTTI442WEeoRf1avQuMAbp SvI/V4zOlo66OQa/nK3LhgwZuMgjnymhVc4JoJU= X-Google-Smtp-Source: AA0mqf7jPY4T0n9icUyBvvv2EJ7kMYn1Ip0HJbhJ6BgyuGEhNkSmFKHwOqGRL+5Ovg3CYmDzI30XcQUBMtweVXeLbgg= X-Received: by 2002:a05:6870:4995:b0:143:522a:ebcc with SMTP id ho21-20020a056870499500b00143522aebccmr3544238oab.199.1669364735460; Fri, 25 Nov 2022 00:25:35 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 25 Nov 2022 00:25:34 -0800 In-Reply-To: <874junfonc.fsf@gmail.com> X-Hashcash: 1:20:221125:larsi@gnus.org::f96494pB2znPILXC:2YE9 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:248977 Archived-At: Robert Pluim writes: > Stefan> I feel like the second alternative goes against the design of > Stefan> `keymap-global-set', where the idea explicitly was to only su= pport a KEY > Stefan> argument that is `key-valid-p'. > > It was? If so, then it should not have been touted as the replacement > for `global-set-key' everywhere without a big warning sign. Yes, see the discussions about it at the time. The same idea is there in all the new keybinding functions. > Stefan> Could we perhaps introduce a new optional argument to treat t= he argument > Stefan> as a literal string? Or if really want it to not be `key-val= id-p', to > Stefan> at least require it to be something like '(literal "foo") ? > > (string-to-vector "foo") will do. But that just highlights the problem > even more: if it=CA=BCs that simple, why can=CA=BCt `keymap-global-set' d= o that > internally instead of forcing users to jump through hoops? AFAIU, because otherwise we can't have error handling for common typos, such as: (keymap-global-set "xo") ; bad, I actually want "x o" I think catching this is more important than supporting the somewhat nicer syntax for inserting strings with a key binding (which you can still do by other means, as you point out).