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: Thu, 24 Nov 2022 16:14:05 -0800 Message-ID: References: <87edu3cml8.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35689"; 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 01:15:21 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 1oyMNE-00091S-PO for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Nov 2022 01:15:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyMMz-0001aj-MX; Thu, 24 Nov 2022 19:15:05 -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 1oyMMx-0001Zc-M2 for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 19:15:03 -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 1oyMMx-000151-5E for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 19:15:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oyMMv-0006Fs-R2 for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 19:15: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 00:15: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.166933526123980 (code B ref 59305); Fri, 25 Nov 2022 00:15:01 +0000 Original-Received: (at 59305) by debbugs.gnu.org; 25 Nov 2022 00:14:21 +0000 Original-Received: from localhost ([127.0.0.1]:60573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyMMH-0006Ei-9E for submit@debbugs.gnu.org; Thu, 24 Nov 2022 19:14:21 -0500 Original-Received: from mail-oi1-f182.google.com ([209.85.167.182]:38479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyMM6-0006Dw-Uy for 59305@debbugs.gnu.org; Thu, 24 Nov 2022 19:14:11 -0500 Original-Received: by mail-oi1-f182.google.com with SMTP id v81so2935493oie.5 for <59305@debbugs.gnu.org>; Thu, 24 Nov 2022 16:14:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=lKG54MzIytosaJwrBCRpgRJZMtMp2gvQbMNXDzK33UI=; b=HO1DMz0leLb5Z7WZufT5R7rwG4Twvak2M2aSfhdHJGCzgHawH8zVf+7+0Ulxf11owW GA6dCgdp25b7J0+rZgx+R0Vq++vQ2TllUIVT96XjmPPTKmhQ3OGmKqHtC/mV10C3Fv9T Qzr9I7HqZ6EjHnrAP1F2/kmcyPaXk3jfBlTA/aB9iFIObHz5anpXGfIMHJ0X56U6hvq8 LS7+5OrxbGR8+33/ZHPj9YU2pFtegJ95YEF/o5G/TEcN6oBeURWWOv3hFa28sRzzqgsl skkCty+MhAidAJbpphC5PUKxjxRvYx717QXvVclLOACJYOGfzetg+LEqy0ITWVJLc/y5 cEiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=lKG54MzIytosaJwrBCRpgRJZMtMp2gvQbMNXDzK33UI=; b=V6x4TpFcmtbh4sfc4/w2fms/6vx69IdDCK73YlnDN8XLWVT44i3Pmw7/zXDsXgB3jS xF7VliRUctacZyB5xx7WnqI/k513xwRhlhiTI7Shua50dKVoVI+QeawTNjIB0hGHndQQ ar+n3ZEWJGKFh9/cremnINJoZVj4N9EvL959BnWQzd7J3Pa6qrD6Ca8wQiat7uZefLel zCECDngOJj50iVnEpjnENc2P95yTF5HUukwFVBEAOOMkwssuH2yJxWRil5EdlB7PtOLy +jN8ve80XSA6e9xlrJvOqGeZ97M9OxaHcrIPA3hrxtLinnAVF33ZAMGjh0QVfUpaA0kU hMzw== X-Gm-Message-State: ANoB5pls49q3H7zCEHFayIVhWBm8/RSfRUoZQRLOaDhN9K4ZOb1FrZ+q gx/xm0GA5mn110GoGG0BJH3Eh49yZDqXLJVzw7Q= X-Google-Smtp-Source: AA0mqf4Ez1HgVrJIAZX3icd/sF8/UTisH/XzubVlp0SARLk/a9xMLuob6kRwfl9NXFRB5xJSdL7zozpSTkXCf8i8Zeg= X-Received: by 2002:a05:6808:2229:b0:35b:2b17:af81 with SMTP id bd41-20020a056808222900b0035b2b17af81mr7927055oib.199.1669335245428; Thu, 24 Nov 2022 16:14:05 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 24 Nov 2022 16:14:05 -0800 In-Reply-To: <87edu3cml8.fsf@gmail.com> (Robert Pluim's message of "Wed, 16 Nov 2022 09:47:31 +0100") X-Hashcash: 1:20:221125:larsi@gnus.org::ebJcydZyi9qZK+T9:1I9W 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:248935 Archived-At: Robert Pluim writes: > After reading up on `key-valid-p': > > 5. (keymap-global-set "C-c h" "h e l l o") => success! > > or alternatively > > 6. (keymap-global-set "C-c h" [?h ?e ?l ?l ?o]) => success! > > Whilst not strictly a regression, this behaviour is confusing and > unhelpful, and the solution is not easily found. I can think of two > solutions: > > 1. Change `kbd' to always return a vector even if the input is > ascii-only, which makes [4] work > 2. Change `keymap-set' to convert ascii-only strings to the format in > [5] or [6]. Probably just a call to `string-to-vector' is enough. I feel like the second alternative goes against the design of `keymap-global-set', where the idea explicitly was to only support a KEY argument that is `key-valid-p'. Could we perhaps introduce a new optional argument to treat the argument as a literal string? Or if really want it to not be `key-valid-p', to at least require it to be something like '(literal "foo") ? It would be useful to here what Lars thinks (in Cc).