From unknown Sun Jun 15 08:17:15 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#60867 <60867@debbugs.gnu.org> To: bug#60867 <60867@debbugs.gnu.org> Subject: Status: 29.0.60; keymap-set-after does not accept the AFTER=t argument Reply-To: bug#60867 <60867@debbugs.gnu.org> Date: Sun, 15 Jun 2025 15:17:15 +0000 retitle 60867 29.0.60; keymap-set-after does not accept the AFTER=3Dt argum= ent reassign 60867 emacs submitter 60867 Daniel Mendler severity 60867 normal tag 60867 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 16 13:20:47 2023 Received: (at submit) by debbugs.gnu.org; 16 Jan 2023 18:20:47 +0000 Received: from localhost ([127.0.0.1]:34814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHU67-0003EH-Nb for submit@debbugs.gnu.org; Mon, 16 Jan 2023 13:20:47 -0500 Received: from lists.gnu.org ([209.51.188.17]:52420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHU62-0003E4-Ck for submit@debbugs.gnu.org; Mon, 16 Jan 2023 13:20:41 -0500 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 1pHU61-0000Nr-MN for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2023 13:20:38 -0500 Received: from server.qxqx.de ([2a01:4f8:121:346::180] helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHU5z-0006Kf-Kw for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2023 13:20:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From :Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=L84PTWCfj8XQJJONFqfN/S08GAebQDWP6yvUIOee5j8=; b=P8CPjk0sEXtUSZg1KJPsQEhTg7 ynWhS81d5Y6IJjmPlacUBNtp9m0xxuo46Thj2LdMhxiyikT62Uh6/izO+6Jedx7Cedo1d5nQp3NAt dqneH8yJiR+Jc6NzlMqAaC6umTy7zCw74mmj8ZkyMuwAJO5EJXGYH6zGM289ekfW+gDU=; From: Daniel Mendler To: bug-gnu-emacs@gnu.org Subject: 29.0.60; keymap-set-after does not accept the AFTER=t argument Date: Mon, 16 Jan 2023 19:20:24 +0100 Message-ID: <878ri2gx3r.fsf@daniel-mendler.de> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a01:4f8:121:346::180; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) The docstring of `keymap-set-after' says that AFTER=t should be accepted, but it fails because of the `keymap--check'. Then I've observed that `keymap-lookup' uses `kbd'. Shouldn't `key-parse' be used instead? In GNU Emacs 29.0.60 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars) of 2023-01-14 built on projects Repository revision: 8d7ad65665833ae99b7e7119dae37afa438968a4 Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux 11 (bullseye) From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 17 12:13:42 2023 Received: (at 60867) by debbugs.gnu.org; 17 Jan 2023 17:13:43 +0000 Received: from localhost ([127.0.0.1]:38107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHpWo-0001yh-LO for submit@debbugs.gnu.org; Tue, 17 Jan 2023 12:13:42 -0500 Received: from mail-wm1-f49.google.com ([209.85.128.49]:35718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHpWn-0001yR-5D for 60867@debbugs.gnu.org; Tue, 17 Jan 2023 12:13:41 -0500 Received: by mail-wm1-f49.google.com with SMTP id fl11-20020a05600c0b8b00b003daf72fc844so5243043wmb.0 for <60867@debbugs.gnu.org>; Tue, 17 Jan 2023 09:13:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ELxRtINQ8+lCefiu28zYVSdiMGV2Vgc5t5qaXeu5FP8=; b=Fma+HJ1X16lwMJI458i4GtNAKhqiPyWkmyLS7RquerlyWVm1Gk59ZAaubCLTOuyzDC xWqZZ2qomq1gWYHG+zWooks7/lcrriFpefJZtCVOJmU4WvODrZYRBHKVQBklrOXIhIGN gasjIwCzq1+CO5H8DCkW+W+oLDEdJvpyNhS6R2PivPU4MehDo3tI7YcTZtN/7Ysz/Nn5 EO3QrVaHfn7EzeCQfoCWWWmIZubFo6cKWoSC9K/kybskgVYVn4V0WbRkzDFUkWhEZuAI bI8GuyzyRfuNKk/+uCDtSN7xR8HI6HCAYcmjtzyi7ubsXvJCWnjjOzWkyEi9hVkDj7fV M/hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ELxRtINQ8+lCefiu28zYVSdiMGV2Vgc5t5qaXeu5FP8=; b=X/u6jO97SjNsTankkY7qroNLxKzb95DWWmnJLW5yyNzdvES11PGHCNqFFUQdt5SAPK u8+fHZs+86vcwniD8K/LoOyWgfKFO4FA8n+hNynkMWzLrhbbaqoiP2aIY4Lk/nDSDP4N +nuZ3lLJmBoLlvPPqwCDVHYRqlL1TPmoSHAGdIGfs61MUgmQOhLZBJb06C8U9a7cIHw1 f2vIykfLozDx654go9HOX/uainy176IhtkKOYait5taK0JzCPbYHOawWMWwEkisZFaQu ga+pIzJNKNds3z/ZS20SioPw1KwX5mxcEea/YEopHLeZBmdhITilXeBUxcigkR3Wsg1U oTpA== X-Gm-Message-State: AFqh2kqmySE6/NDwKrB4k7dKt/KKZDbg4scFVrHycZFr4lzN8xfu8Jt5 6M/OhyBYckfjYWglpeuxbHSJKSfICLQ= X-Google-Smtp-Source: AMrXdXs+JYmZAnD3HZpwRSmJO8qu4DUYxEe3YbMTmAUEJo3u8/C3qvIjTDOj5DzxGDYsh+2tr5qPWw== X-Received: by 2002:a05:600c:3ca2:b0:3d9:103d:9081 with SMTP id bg34-20020a05600c3ca200b003d9103d9081mr12420510wmb.28.1673975614735; Tue, 17 Jan 2023 09:13:34 -0800 (PST) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id v12-20020a05600c444c00b003db0ee277b2sm594876wmn.5.2023.01.17.09.13.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 09:13:34 -0800 (PST) From: Robert Pluim To: Daniel Mendler Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument In-Reply-To: <878ri2gx3r.fsf@daniel-mendler.de> (Daniel Mendler's message of "Mon, 16 Jan 2023 19:20:24 +0100") References: <878ri2gx3r.fsf@daniel-mendler.de> Date: Tue, 17 Jan 2023 18:13:33 +0100 Message-ID: <87r0vtaxtu.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60867 Cc: 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Mon, 16 Jan 2023 19:20:24 +0100, Daniel Mendler said: Daniel> The docstring of `keymap-set-after' says that AFTER=3Dt should = be Daniel> accepted, but it fails because of the `keymap--check'. True. But the problems go deeper than that. `keymap-set-after' does this: (define-key-after keymap (key-parse key) definition (and after (key-parse after)))) So passing eg "C-a" as `after' results in (key-parse "C-a") =3D> [1] being passed to `define-key-after'. But the events in keymaps for keys are not vectors, they=CA=BCre integers, so this can never actually work unless we do something like this: diff --git c/lisp/keymap.el i/lisp/keymap.el index 315eaab7560..a0575cd1b9f 100644 --- c/lisp/keymap.el +++ i/lisp/keymap.el @@ -186,10 +186,10 @@ keymap-set-after (declare (indent defun) (compiler-macro (lambda (form) (keymap--compile-check key) form= ))) (keymap--check key) - (when after - (keymap--check after)) - (define-key-after keymap (key-parse key) definition - (and after (key-parse after)))) + (when (and after (not (eq after t))) + (keymap--check after) + (setq after (aref (key-parse after) 0))) + (define-key-after keymap (key-parse key) definition after)) =20 (defun key-parse (keys) "Convert KEYS to the internal Emacs key representation. but that makes me wonder what else I=CA=BCm missing, since that feels kind of wrong. Hmm, maybe we should be taking the last element there, not the first? Daniel> Then I've observed that `keymap-lookup' uses `kbd'. Shouldn't Daniel> `key-parse' be used instead? `kbd' supports a slightly less strict syntax than `key-parse' for historical reasons. It=CA=BCs not something I think we should change without good reason. Certainly not in emacs-29 Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 17 12:18:26 2023 Received: (at 60867) by debbugs.gnu.org; 17 Jan 2023 17:18:27 +0000 Received: from localhost ([127.0.0.1]:38115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHpbO-00026Z-O3 for submit@debbugs.gnu.org; Tue, 17 Jan 2023 12:18:26 -0500 Received: from server.qxqx.de ([178.63.65.180]:41435 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHpbN-00026M-BB for 60867@debbugs.gnu.org; Tue, 17 Jan 2023 12:18:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: 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=rel5PZlcj7shxtjzsbvgS1d89ePQPZCvqxZd7+yWYmY=; b=JJ+VP2HZKpBLMc/o5SQGgE2XUg 2hwEcLiyf6uK2gtcBcnmCU04XsEjaZR2ROrzqkotnAOBZZRMtlroIfgqCFE16+oJbVBmth/e/nqGe LV309dK4aVcN7G4Wt3h+eLXe3rR6wW3Q/S77EFj22GvVzLV2sGUIw14wSwL/sQljyEVU=; Message-ID: <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> Date: Tue, 17 Jan 2023 18:18:17 +0100 MIME-Version: 1.0 Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument To: Robert Pluim References: <878ri2gx3r.fsf@daniel-mendler.de> <87r0vtaxtu.fsf@gmail.com> Content-Language: en-US From: Daniel Mendler In-Reply-To: <87r0vtaxtu.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60867 Cc: 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 1/17/23 18:13, Robert Pluim wrote: > `kbd' supports a slightly less strict syntax than `key-parse' for > historical reasons. Itʼs not something I think we should change > without good reason. Certainly not in emacs-29 keymap-lookup was added in 29. So it is still time to use key-parse instead of kbd? Daniel From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 18 03:36:40 2023 Received: (at 60867) by debbugs.gnu.org; 18 Jan 2023 08:36:40 +0000 Received: from localhost ([127.0.0.1]:39088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pI3w0-0001v4-DC for submit@debbugs.gnu.org; Wed, 18 Jan 2023 03:36:40 -0500 Received: from mail-wr1-f48.google.com ([209.85.221.48]:37786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pI3vw-0001uj-3B for 60867@debbugs.gnu.org; Wed, 18 Jan 2023 03:36:38 -0500 Received: by mail-wr1-f48.google.com with SMTP id r9so10337129wrw.4 for <60867@debbugs.gnu.org>; Wed, 18 Jan 2023 00:36:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=IUtDynSYBxjYbnSKg6hAIZxfD4AxP5VjUaNlAEm5DbM=; b=h1DFl/cvE9t6C9U53rUw629SA52Piy8lWj0wZiSRVbOhdCa5xk5dGsEBGIQhES7dbo pQhIn0hXOxg9El3dIBA4S66I8z/rgSz+ZUUL79lCnKAc7yzrNWxZo6f6bCfqtfBv5X/e 07Iq3l3FII4a10x8B+fMUqqfHDtJjVxuGMEnHCgFdh4EyDIpYb0TQgsX9IQBJVo4/KZu fkq7jI9wWtIaqbMArT2KYEU4KHrPC1Rd3ENQZngvKvzd//gaJg6n+KK5jKvEJaLR2FiM HMvf1P2LFSTX5rb9zsRZlXVpXoOSysphk1Na+pGEqbw7ALZaIIHU57W1NL3ZU4S3/rU8 mmLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IUtDynSYBxjYbnSKg6hAIZxfD4AxP5VjUaNlAEm5DbM=; b=PX9ekI4i+cjkwib9/ekIO+NQ621IREdcCp+Vsz8K5HfkopMzgDm+fJl+67zRC2yYQP kI6ByVdjYRmsqw/gE7DnpcQHj/Jjwor+PZVvDDgyVm4nRdK3zBt0cUL2HdsQw2cnzKiM E16CV+z0ngHGAnj9dSbQWCLn7kgA3Iv9tgjQqHWfNS9AYn4hcMLMRnbk3GOMfawWZbMF sGo782po6SIFRdEcQiop6qI90mwY9Nm65oEt2xFN90PG8EQz7K8t+6Eaee24P+yL2YkS 8QAAgSq8lYK789h/7XeVAgxxJFxMtyvF0PMeavinkdhuUrzlbVZSj3TlZwNEi7RgqdPR 31wA== X-Gm-Message-State: AFqh2kpMfCtdVOMoRpZbuJtVTGGCqYbghRzfHA0tNU9W4zX1V2lI36TW Nbjvo9SRYgfTxYM5cvMuJForlF45vig= X-Google-Smtp-Source: AMrXdXv4icCSJWf7D97orKGT1S1wzGRmLj1pEpH5guqPZLEqdE3yhlsgdJZg5zsYSWztncanVQxOWw== X-Received: by 2002:a05:6000:3c2:b0:2bd:d45c:3929 with SMTP id b2-20020a05600003c200b002bdd45c3929mr6406354wrg.54.1674030989545; Wed, 18 Jan 2023 00:36:29 -0800 (PST) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id o7-20020a5d62c7000000b002bbeda3809csm24828100wrv.11.2023.01.18.00.36.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 00:36:28 -0800 (PST) From: Robert Pluim To: Daniel Mendler Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument In-Reply-To: <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> (Daniel Mendler's message of "Tue, 17 Jan 2023 18:18:17 +0100") References: <878ri2gx3r.fsf@daniel-mendler.de> <87r0vtaxtu.fsf@gmail.com> <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> Date: Wed, 18 Jan 2023 09:36:28 +0100 Message-ID: <87edrsb5o3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60867 Cc: 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Tue, 17 Jan 2023 18:18:17 +0100, Daniel Mendler said: Daniel> On 1/17/23 18:13, Robert Pluim wrote: >> `kbd' supports a slightly less strict syntax than `key-parse' for >> historical reasons. It=CA=BCs not something I think we should change >> without good reason. Certainly not in emacs-29 Daniel> keymap-lookup was added in 29. So it is still time to use key-p= arse Daniel> instead of kbd? You=CA=BCre right about that, and all the related commands talk about `key-valid-p'. I checked the usage of `keymap-lookup' in emacs-29, and switching it to `key-parse' should be fine. Care to propose a patch? Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 18 05:29:36 2023 Received: (at 60867) by debbugs.gnu.org; 18 Jan 2023 10:29:36 +0000 Received: from localhost ([127.0.0.1]:39269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pI5hI-0004qA-J3 for submit@debbugs.gnu.org; Wed, 18 Jan 2023 05:29:36 -0500 Received: from server.qxqx.de ([178.63.65.180]:54935 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pI5hE-0004pu-Di for 60867@debbugs.gnu.org; Wed, 18 Jan 2023 05:29:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: 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=O9bdW9TFQMKn03fNvE0Pk8MiVr6biNid0ZKavQewHBI=; b=OyIKK7cgQ/c2J5XXumj0Tn7uAk D3piBBzSbHlSfuWZZZRvPoV1/PXsnSJLfrPCa3VV3w5dHXxdDpHIrsh6B2iQU0x4igfK1GteKnYns eZzqqF0RqyWOBWdcUA17wSmr+r6Sa3jRPEjRBDZr1cr2GIYOF0/udRHgXv5bYI2ApF1c=; Message-ID: <9d95e891-22ad-d700-3fab-69948a8a1a17@daniel-mendler.de> Date: Wed, 18 Jan 2023 11:29:22 +0100 MIME-Version: 1.0 Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument To: Robert Pluim References: <878ri2gx3r.fsf@daniel-mendler.de> <87r0vtaxtu.fsf@gmail.com> <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> <87edrsb5o3.fsf@gmail.com> Content-Language: en-US From: Daniel Mendler In-Reply-To: <87edrsb5o3.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60867 Cc: 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 1/18/23 09:36, Robert Pluim wrote: > Youʼre right about that, and all the related commands talk about > `key-valid-p'. I checked the usage of `keymap-lookup' in emacs-29, and > switching it to `key-parse' should be fine. Okay, good! > Care to propose a patch? No, I am too busy these days maintaining other projects, in particular Compat from GNU ELPA, thanks to which I found this issue. Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 19 04:55:58 2023 Received: (at 60867) by debbugs.gnu.org; 19 Jan 2023 09:55:58 +0000 Received: from localhost ([127.0.0.1]:42649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIReI-0002Mp-BZ for submit@debbugs.gnu.org; Thu, 19 Jan 2023 04:55:58 -0500 Received: from mail-wm1-f47.google.com ([209.85.128.47]:55880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIReG-0002MY-Jm for 60867@debbugs.gnu.org; Thu, 19 Jan 2023 04:55:57 -0500 Received: by mail-wm1-f47.google.com with SMTP id q8so1041353wmo.5 for <60867@debbugs.gnu.org>; Thu, 19 Jan 2023 01:55:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=OQC7BFKORj/kmENR58d804YLDryBrMmcmpzYXvm7JmQ=; b=T2YzYvWjU2X99PA08tHQ6AEhpajA0exlJ82mueREzX7qEfLSy+UPpaP+F6F1Ki1Alf ZLZGNmNQ0gQFEaPMYwcN6TLs/7xLaocWO4nGrldJNNKZJOQL1c53+Ttb5R5oZuPH9n9j 8/pV3Y3SQNb+mp8ieJOaiNOa8bocLUOMw4R7LumI3C0qKn1dHBsj9GMyosEoILbToqAe kwDfZVnYBYBTIqenolXEjhbc4AEqrqUkgu7ehRF5rl8Ne4yzkm91Ol60A8Pr02qC693Q E3mXnXeDmL60hQNJ0QWXtk/jqQvZyjC9cg7A/oBTMc16shU8/BtL5r7+XU01WCHDNEPb 4VDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OQC7BFKORj/kmENR58d804YLDryBrMmcmpzYXvm7JmQ=; b=7hQTMmEziPINXj2fuYOrNpw6i0YefMZKnQX2E5KRCDyVPunwiP1cnO4QkZrHyMS+H+ 9LZlu8RHVONhCWZ/dm2GsbHULcE3MGAkq3lKuwCmtrJfnm4XaYVnhFmxrgjaH0JEKCAE 3mYEe2Ix/PK8gQVatTjkBeXSLOAy2oDohqNOIyljySIf59ITg2kHP07Mk6nGiSkbMBxU Z92eU6oTKLmoW06Qm6immFxine5GiOoAxtP6kyfVzTXR8CbroYX4VjZxiPyNyDgf2frv v1jbdxYwVM6JlZlmQBm7RLr6MCFQPldieJcJ37swVddoByZcRLClyA+M2LPdTNXKuC8R YUcA== X-Gm-Message-State: AFqh2kpaAQyYHEk7agVqnun+MN/EywqibZDPOdhaHrFmPD+jJ8W5MfVw PkoYVeaLYAKCR3qsCkShnxM= X-Google-Smtp-Source: AMrXdXvPlkduH6+gJ+CRpl9ppy2ZvqsQpS5egy5QgHQy2+3uXbLB1XaWr+g8ohSHCoKki6jxamtnUw== X-Received: by 2002:a1c:f310:0:b0:3db:15d9:1485 with SMTP id q16-20020a1cf310000000b003db15d91485mr4621695wmq.39.1674122150339; Thu, 19 Jan 2023 01:55:50 -0800 (PST) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id o7-20020a5d62c7000000b002bbeda3809csm27425711wrv.11.2023.01.19.01.55.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 01:55:49 -0800 (PST) From: Robert Pluim To: Daniel Mendler Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument In-Reply-To: Robert Pluim's message of "(unknown date)" References: <878ri2gx3r.fsf@daniel-mendler.de> <87r0vtaxtu.fsf@gmail.com> <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> <87edrsb5o3.fsf@gmail.com> <9d95e891-22ad-d700-3fab-69948a8a1a17@daniel-mendler.de> Date: Thu, 19 Jan 2023 10:55:49 +0100 Message-ID: <87o7qualwa.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60867 Cc: Eli Zaretskii , 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) The nice thing about keymaps in Emacs is that everything is so consistent :-). The bare minimum to fix this bug: diff --git c/lisp/keymap.el i/lisp/keymap.el index 315eaab7560..2caaafabb94 100644 --- c/lisp/keymap.el +++ i/lisp/keymap.el @@ -186,6 +186,7 @@ keymap-set-after (declare (indent defun) (compiler-macro (lambda (form) (keymap--compile-check key) form= ))) (keymap--check key) + (when (eq after t) (setq after nil)) ; nil and t are treated the same (when after (keymap--check after)) (define-key-after keymap (key-parse key) definition However, `keymap-set' and `keymap-set-after' don=CA=BCt behave the same: (let ((k (make-sparse-keymap))) (keymap-set k "a" "a") (keymap-set-after k "b" "b") k) =3D> (keymap (97 . [97]) (98 . "b")) so for consistency I=CA=BCd want to put the following in emacs-29: diff --git c/lisp/keymap.el i/lisp/keymap.el index 315eaab7560..19faae5c493 100644 --- c/lisp/keymap.el +++ i/lisp/keymap.el @@ -188,6 +188,11 @@ keymap-set-after (keymap--check key) (when after (keymap--check after)) + ;; If we're binding this key to another key, then parse that other + ;; key, too. + (when (stringp definition) + (keymap--check definition) + (setq definition (key-parse definition))) (define-key-after keymap (key-parse key) definition (and after (key-parse after)))) And of course the following for consistency for `keymap-lookup' as well. I now firmly believe that the new keymap functions should use `key-parse' and not `kbd'. diff --git c/lisp/keymap.el i/lisp/keymap.el index 315eaab7560..da71d48c86e 100644 --- c/lisp/keymap.el +++ i/lisp/keymap.el @@ -404,7 +404,7 @@ keymap-lookup (symbolp value)) (or (command-remapping value) value) value)) - (key-binding (kbd key) accept-default no-remap position))) + (key-binding (key-parse key) accept-default no-remap position))) =20 (defun keymap-local-lookup (keys &optional accept-default) "Return the binding for command KEYS in current local keymap only. Eli, is this too much for emacs-29? Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 19 05:08:18 2023 Received: (at 60867) by debbugs.gnu.org; 19 Jan 2023 10:08:18 +0000 Received: from localhost ([127.0.0.1]:42668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIRqD-0002jS-VX for submit@debbugs.gnu.org; Thu, 19 Jan 2023 05:08:18 -0500 Received: from server.qxqx.de ([178.63.65.180]:39207 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIRqC-0002jC-1g for 60867@debbugs.gnu.org; Thu, 19 Jan 2023 05:08:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: 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=1jnFPzl4WD/JoKFHHvKpf4rjfl6v8kh1qyy7t3w8dIc=; b=NpWNai5REYmYPz0ryAjoc3QxGb 0GwkWZxPeJILxDyQtWDZBFgAW75SJhghRgCWHu2w+mG47CEJqqSbGQYIf7KDE7XbW/mV/kC518B0Q iv4G7BEI1zxk2lrpQlJsZPhI/sh2KK16HGGuV2BjriSFGOEvWS7vTkclzA1M6ua3sB+M=; Message-ID: <17aa757a-935d-547c-b432-9529d1ed6d6b@daniel-mendler.de> Date: Thu, 19 Jan 2023 11:08:07 +0100 MIME-Version: 1.0 Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument To: Robert Pluim References: <878ri2gx3r.fsf@daniel-mendler.de> <87r0vtaxtu.fsf@gmail.com> <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> <87edrsb5o3.fsf@gmail.com> <9d95e891-22ad-d700-3fab-69948a8a1a17@daniel-mendler.de> <87o7qualwa.fsf@gmail.com> Content-Language: en-US From: Daniel Mendler In-Reply-To: <87o7qualwa.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60867 Cc: Eli Zaretskii , 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 1/19/23 10:55, Robert Pluim wrote: > And of course the following for consistency for `keymap-lookup' as > well. I now firmly believe that the new keymap functions should use > `key-parse' and not `kbd'. Robert, speaking of `key-parse', I wonder why this function accepts invalid key strings. Why don't we move the `key-valid-p' check to `key-parse'? This would alleviate the need for many additional `key-valid-p' checks across keymap.el. One could maybe even get rid of the `keymap--check' helper. The function `key-parse' is publicly exposed to the user and as such it would be good if it were as strict as the rest of the keymap.el API. However `kbd' has been reimplemented based on `key-parse' which prevents `key-parse' from being more strict. One could either introduce a `key--parse-lax` function which is used by `kbd' and `key-parse' (plus a `key-valid-p' check) or add a NOERROR/NOVALIDATE argument to `key-parse', which is then used by `kbd'. What do you think? > Eli, is this too much for emacs-29? While it is late for 29, these APIs were newly and I believe it would be better to improve them now, such that they don't have to change again in the next release. Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 19 05:16:35 2023 Received: (at 60867) by debbugs.gnu.org; 19 Jan 2023 10:16:35 +0000 Received: from localhost ([127.0.0.1]:42695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIRyE-0002ya-Mk for submit@debbugs.gnu.org; Thu, 19 Jan 2023 05:16:34 -0500 Received: from mail-wm1-f50.google.com ([209.85.128.50]:52158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIRyC-0002yN-QW for 60867@debbugs.gnu.org; Thu, 19 Jan 2023 05:16:33 -0500 Received: by mail-wm1-f50.google.com with SMTP id g10so1110108wmo.1 for <60867@debbugs.gnu.org>; Thu, 19 Jan 2023 02:16:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=sMMZDfHkkzhWMgzWe9JcvwQrjwxvK0yXUXhpOSkAjp4=; b=ovsTtGV7xa98WzYxp/yNTFkiLY9tRxBEPYTGcJtKKgXrJ86o7uiZfK2Gl0ufyH/iPo 7iSjDw5Z/T3OrZKJv6rYkZGft8/syAd9tFJz1ZpTCh6qzdQDXdMFvBLtxZH0JqMDWanD /2iaZp9XWnVleP6xqB8vSnb1OhKZA0xEMvkmp5sifv3dlFAnv+H4p0oyIzUy1hAPD93E dY1WlkmcViYzu9ZevDFPUqJrVnGAQIQQasOyww4Zt3zGv+q64h1uM3GVc0qPb/8zeeCA ZFZk9m9WK2+pt7dxOAFAWSYtpbgcGsJOBMqynTC8Uk3bwEtC8G/RfOpGdQrHaT3AQ8he 5o/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sMMZDfHkkzhWMgzWe9JcvwQrjwxvK0yXUXhpOSkAjp4=; b=Lsxs8HHhR8sTqBoBfGQzGiaL2z859pnOr2nDbEvnhFqq7Kyij7g0Nl9ySto5dg3rJ0 UezzR0VB9srSVQt1XopG9vYi6zonfUpzonc16LQU3aVLrXaIZFabo1+E2vQm7EyGdlKr IVruot8YVoHLjkOG2qtVN9U5Sd6jcN5WWZWn+zGClqffJh++v9+K57Dah89dAbUaq552 i1H2aS34euSCATqX/hw18ITns7FIOU6WikJ3sHAdmF1Yu+VxhbXHKMSYJn3K+c6m3NWG VKw9nDbMPhq+qTlr6sGCNiYyS72V08l5mEa5f945ig9gCPRoVO1LKCkFE1V2wxt9Yip+ n7Xg== X-Gm-Message-State: AFqh2kqBuUpdic9Mu8598Vf3ecg1K+rQYyePd5kiKuvXwdXqcxYl4UK4 KSjOqS5Y+lKcZe3X0DeMu6U= X-Google-Smtp-Source: AMrXdXsn5f61rD9ecc5F1wzNmZXpvl3I81MMRJfZreBWGG25KUyLfqNe0tyZskitO5fE2wOQHi7YYQ== X-Received: by 2002:a05:600c:2116:b0:3d6:10e:68a8 with SMTP id u22-20020a05600c211600b003d6010e68a8mr5825401wml.0.1674123386756; Thu, 19 Jan 2023 02:16:26 -0800 (PST) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id f2-20020adff982000000b002bde537721dsm15413827wrr.20.2023.01.19.02.16.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 02:16:25 -0800 (PST) From: Robert Pluim To: Daniel Mendler Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument In-Reply-To: <17aa757a-935d-547c-b432-9529d1ed6d6b@daniel-mendler.de> (Daniel Mendler's message of "Thu, 19 Jan 2023 11:08:07 +0100") References: <878ri2gx3r.fsf@daniel-mendler.de> <87r0vtaxtu.fsf@gmail.com> <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> <87edrsb5o3.fsf@gmail.com> <9d95e891-22ad-d700-3fab-69948a8a1a17@daniel-mendler.de> <87o7qualwa.fsf@gmail.com> <17aa757a-935d-547c-b432-9529d1ed6d6b@daniel-mendler.de> Date: Thu, 19 Jan 2023 11:16:24 +0100 Message-ID: <87k01iakxz.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60867 Cc: Eli Zaretskii , 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Thu, 19 Jan 2023 11:08:07 +0100, Daniel Mendler said: Daniel> On 1/19/23 10:55, Robert Pluim wrote: >> And of course the following for consistency for `keymap-lookup' as >> well. I now firmly believe that the new keymap functions should use >> `key-parse' and not `kbd'. Daniel> Robert, speaking of `key-parse', I wonder why this function acc= epts Daniel> invalid key strings. Why don't we move the `key-valid-p' check = to Daniel> `key-parse'? This would alleviate the need for many additional Daniel> `key-valid-p' checks across keymap.el. One could maybe even get= rid of Daniel> the `keymap--check' helper. Do you have an example of such an invalid string? Daniel> The function `key-parse' is publicly exposed to the user and as= such it Daniel> would be good if it were as strict as the rest of the keymap.el= API. Daniel> However `kbd' has been reimplemented based on `key-parse' which= prevents Daniel> `key-parse' from being more strict. One could either introduce a Daniel> `key--parse-lax` function which is used by `kbd' and `key-parse= ' (plus a Daniel> `key-valid-p' check) or add a NOERROR/NOVALIDATE argument to Daniel> `key-parse', which is then used by `kbd'. What do you think? >> Eli, is this too much for emacs-29? Daniel> While it is late for 29, these APIs were newly and I believe it= would be Daniel> better to improve them now, such that they don't have to change= again in Daniel> the next release. I think it=CA=BCs too late to make such changes for emacs-29. I=CA=BCm not = even sure that the minimal changes I proposed will be accepted :-) Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 19 05:23:11 2023 Received: (at 60867) by debbugs.gnu.org; 19 Jan 2023 10:23:11 +0000 Received: from localhost ([127.0.0.1]:42703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIS4c-00039D-Qo for submit@debbugs.gnu.org; Thu, 19 Jan 2023 05:23:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIS4a-00038z-Jg for 60867@debbugs.gnu.org; Thu, 19 Jan 2023 05:23:09 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIS4U-0000UU-QT; Thu, 19 Jan 2023 05:23:02 -0500 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=a/J8csHT6NqwCl5UnNuZD3BHWOAi+39FnH7HHNMP6qw=; b=X1Il83bKLMzy OQxpvQJznIVzFngdPZYtaKDqFviGO1tZonQSdNUN1g//wMWSHfKXmozu2Yx3BbgtATEiM8PrOmudK XAGnXHTx7uzruxBEkrC77rqpOj+JPEIQ93ldVynSvrUYRYJX0Lv0FUEXZRjtx0nllLjxIkYKYZhTG jysitfiI8CoiUrvLc5TktCd2+1CzUpNDY+G4qTukan0J4BZuSx1t3wA4055hrfOQe7nsxTPxc6yEd KSh+8NmQTrG0NeaQ/PVwhOSwcEs8qhKTVyhgS5YT7AgbMBu3U5VVdc3ssDeS/NLod7RlfrKwMK/WA w0ByMJoyhQ86ImsQZUmp7A==; Received: from [87.69.77.57] (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 1pIS4T-00050g-O7; Thu, 19 Jan 2023 05:23:02 -0500 Date: Thu, 19 Jan 2023 12:23:17 +0200 Message-Id: <83mt6ezuui.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-Reply-To: <87o7qualwa.fsf@gmail.com> (message from Robert Pluim on Thu, 19 Jan 2023 10:55:49 +0100) Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument References: <878ri2gx3r.fsf@daniel-mendler.de> <87r0vtaxtu.fsf@gmail.com> <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> <87edrsb5o3.fsf@gmail.com> <9d95e891-22ad-d700-3fab-69948a8a1a17@daniel-mendler.de> <87o7qualwa.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60867 Cc: mail@daniel-mendler.de, 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Robert Pluim > Cc: 60867@debbugs.gnu.org, Eli Zaretskii > Date: Thu, 19 Jan 2023 10:55:49 +0100 > > Eli, is this too much for emacs-29? I think this is fine, as all of those functions are new in Emacs 29, right? From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 19 05:39:44 2023 Received: (at 60867) by debbugs.gnu.org; 19 Jan 2023 10:39:44 +0000 Received: from localhost ([127.0.0.1]:42750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pISKe-0003bN-Gi for submit@debbugs.gnu.org; Thu, 19 Jan 2023 05:39:44 -0500 Received: from server.qxqx.de ([178.63.65.180]:59123 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pISKc-0003b4-OF for 60867@debbugs.gnu.org; Thu, 19 Jan 2023 05:39:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: 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=Syre19JcCNx4kQclvVQRMvtdKUKW6vYLWPT4oLtJ6Pc=; b=adrS7yzePG4QFyCpoQj37a7e/9 DgMt2nZRZ2UUdmOlzQtXRvggTvPW90q1171fGL4cp86ovzhzIZyyas0lKYpxb6tS80iDkfyX8YoyM HL3LW87z49bHRHUhIXQpoi+6ON8+i/dkOZZqnzsHxKNUX0oUdCcGEgteIyAnY31rhK3E=; Message-ID: <5bbc8220-6745-a123-a143-6b740caec8fa@daniel-mendler.de> Date: Thu, 19 Jan 2023 11:39:34 +0100 MIME-Version: 1.0 Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument To: Robert Pluim References: <878ri2gx3r.fsf@daniel-mendler.de> <87r0vtaxtu.fsf@gmail.com> <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> <87edrsb5o3.fsf@gmail.com> <9d95e891-22ad-d700-3fab-69948a8a1a17@daniel-mendler.de> <87o7qualwa.fsf@gmail.com> <17aa757a-935d-547c-b432-9529d1ed6d6b@daniel-mendler.de> <87k01iakxz.fsf@gmail.com> Content-Language: en-US From: Daniel Mendler In-Reply-To: <87k01iakxz.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60867 Cc: Eli Zaretskii , 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 1/19/23 11:16, Robert Pluim wrote: > Daniel> Robert, speaking of `key-parse', I wonder why this function accepts > Daniel> invalid key strings. Why don't we move the `key-valid-p' check to > Daniel> `key-parse'? This would alleviate the need for many additional > Daniel> `key-valid-p' checks across keymap.el. One could maybe even get rid of > Daniel> the `keymap--check' helper. > > Do you have an example of such an invalid string? Just try something like this: (key-valid-p "bug") (key-parse "bug") > Daniel> The function `key-parse' is publicly exposed to the user and as such it > Daniel> would be good if it were as strict as the rest of the keymap.el API. > Daniel> However `kbd' has been reimplemented based on `key-parse' which prevents > Daniel> `key-parse' from being more strict. One could either introduce a > Daniel> `key--parse-lax` function which is used by `kbd' and `key-parse' (plus a > Daniel> `key-valid-p' check) or add a NOERROR/NOVALIDATE argument to > Daniel> `key-parse', which is then used by `kbd'. What do you think? > > >> Eli, is this too much for emacs-29? > > Daniel> While it is late for 29, these APIs were newly and I believe it would be > Daniel> better to improve them now, such that they don't have to change again in > Daniel> the next release. > > I think itʼs too late to make such changes for emacs-29. Iʼm not even > sure that the minimal changes I proposed will be accepted :-) I don't think so since of all these functions are new. These seem like simple internal refactorings. Adding a NOERROR argument to key-parse seems like the least intrusive approach. Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 19 05:41:00 2023 Received: (at 60867) by debbugs.gnu.org; 19 Jan 2023 10:41:00 +0000 Received: from localhost ([127.0.0.1]:42754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pISLr-0003da-Ux for submit@debbugs.gnu.org; Thu, 19 Jan 2023 05:41:00 -0500 Received: from mail-wm1-f50.google.com ([209.85.128.50]:37831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pISLp-0003dK-T1 for 60867@debbugs.gnu.org; Thu, 19 Jan 2023 05:40:58 -0500 Received: by mail-wm1-f50.google.com with SMTP id bg13-20020a05600c3c8d00b003d9712b29d2so3264433wmb.2 for <60867@debbugs.gnu.org>; Thu, 19 Jan 2023 02:40:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=mFXG35oeds4vF3ooW6V0UyaHxWczZbuLz6fwumQldFs=; b=oNWWqLIdI+/UHyc8cjrqhDBSKebNSsqBUF+53G+Cvx8LR4h20OgTcG2boQQjGggmkv J5qLUs4sm18/XDJXVH/3pS+Ritfd5shnJ2ovli51+FACdHph8lhXVLreklXsFZmubP6Q j2Hh3evc74RbIe6CrUBvyC8iIFKCs02DyOdcBP30Q5KN+fJAbbmhNtzWynYsTU9VAhwr Zehmgvpxm/kK76ahx3ydhe/1Hcg+gjiQukNDPwupABvxtwlEy6iCtg4ZyJ9Y+DfW2FTu aaOZcatqKFAGv2HzQE6C4qhEfbvw7bamJC8DJKDwAzWVuDTQ2DP7vPfSsSZ6zkgMbJDY t+rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mFXG35oeds4vF3ooW6V0UyaHxWczZbuLz6fwumQldFs=; b=pQ1x/a+2UmRDh0kWR7myVRaWqxV/VVoHH+NpDkezSffSBtNWNyK1VHlFoKZOZEhqeM oNB2YMjhmoYzia2BXXsKtbnFjt4ZaKZ6A/33R6OPZ4ZC1gK7eFdZTxC3QqxIFXfW0FMK 7KEbBTHKCRSow3uh8JmYUuJpUwvGCxJ7gfxkVWZUASWxIiC1+k88dXvcnH+DQUKMNpnG 1w13n4eSU5Bs0smKkZ40NwLfKEYUoduAq8q/O8QJDJ9BY8aawk23Wkctd01HKGLCOJYK kbiPN8wzBRbuOHdkBMHfTJPZBvhFm70pa2c37G0mIJYsV9s2X8rmvIO/HOih3zOVTR6f s0mA== X-Gm-Message-State: AFqh2koKgYS7aAzp8vlmL8wBjbus7soAS+XKbs95APWpvg0I+Hiddo5J FEy+Ik5IjaIPnPURbJqUsOFJETsE76LmSA== X-Google-Smtp-Source: AMrXdXsgrVfUkbSl77BBwcKs9yIg2ehzQKcVpKfry67RvB38DYNkfsCtYOr0uwqub9xYV8NSZOEmzw== X-Received: by 2002:a05:600c:1d12:b0:3db:53f:baea with SMTP id l18-20020a05600c1d1200b003db053fbaeamr9553218wms.6.1674124851622; Thu, 19 Jan 2023 02:40:51 -0800 (PST) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id j35-20020a05600c1c2300b003c71358a42dsm6038997wms.18.2023.01.19.02.40.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 02:40:50 -0800 (PST) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument In-Reply-To: <83mt6ezuui.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 19 Jan 2023 12:23:17 +0200") References: <878ri2gx3r.fsf@daniel-mendler.de> <87r0vtaxtu.fsf@gmail.com> <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> <87edrsb5o3.fsf@gmail.com> <9d95e891-22ad-d700-3fab-69948a8a1a17@daniel-mendler.de> <87o7qualwa.fsf@gmail.com> <83mt6ezuui.fsf@gnu.org> Date: Thu, 19 Jan 2023 11:40:50 +0100 Message-ID: <87fsc6ajt9.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60867 Cc: mail@daniel-mendler.de, 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Thu, 19 Jan 2023 12:23:17 +0200, Eli Zaretskii said: >> From: Robert Pluim >> Cc: 60867@debbugs.gnu.org, Eli Zaretskii >> Date: Thu, 19 Jan 2023 10:55:49 +0100 >>=20 >> Eli, is this too much for emacs-29? Eli> I think this is fine, as all of those functions are new in Emacs 2= 9, Eli> right? Yes, they=CA=BCre all new for emacs-29. Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 19 06:05:46 2023 Received: (at 60867) by debbugs.gnu.org; 19 Jan 2023 11:05:46 +0000 Received: from localhost ([127.0.0.1]:42764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pISjq-0004MM-Gl for submit@debbugs.gnu.org; Thu, 19 Jan 2023 06:05:46 -0500 Received: from mail-wr1-f46.google.com ([209.85.221.46]:39703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pISjo-0004M7-PO for 60867@debbugs.gnu.org; Thu, 19 Jan 2023 06:05:45 -0500 Received: by mail-wr1-f46.google.com with SMTP id z5so1478320wrt.6 for <60867@debbugs.gnu.org>; Thu, 19 Jan 2023 03:05:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=uo/CxRrB2jvvGVppbpK8bN82X4e4n8UPzZMU61bDkzo=; b=cRXLl0ZrfU3NWRTk+QxqBXMCwi/gckPqLjb9wpeei7jm/ckGG0nvugO9AuB2Uwphc0 y1Z+46rKjw07CSuDNyiBXbSJUoriYosXgdGfYYk6yYKJxXakZ5+uuCJu7XgIRKYdvgPl I5N2xWi6ajOu9O7SvKcmB00kRYYgVQnpKUr12hwJtLk2dIpGY0c++WsOj7FBdhQScfiS 7k+aze5dcLM8e0cHULlYhSzBTVoSCT0boRssGlhHaxZjWhiSejGegSOFG0ZIDhssAFOe UEid96fLQiw20Ut7tUyDOo47r2Nt+uYDH8MF4OxF7nk2y0NkA5MmtXnHCQE18+u33nzb VPKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uo/CxRrB2jvvGVppbpK8bN82X4e4n8UPzZMU61bDkzo=; b=wzMzAGlb9X9Pf8SbgT/eas9XpiUxeQJnAEum7rFToqzG3h1+jXmk6b1CbAEvLASVDK x10w80iZattSczkG2FOWODw3wDZBXYKEYZ39wZPLxny7N0Lzleep8YCMrFnbHo8wpMn/ ZRT0IlOIZG9g9+9+R30MeT0+09ErNEgnriVpuiwBnV329jKa76ejd53JXKMX2W6ZnA9Z o7WrGb6dwWU54r7x5tXyodJsBuNbr/tfp7m7PsPvnk0FXbgNjnJkRflB7Gcm8xDvEzYM 1Uf30zWj96OYhK1icvjTt3Gw9twrxjMgW/N143EJQqMD5sXhIO+ShJZEs4u6/n2oQWJD 5u1g== X-Gm-Message-State: AFqh2kqZgFoRnfV6VGAoEhfKHVzb9GoHMHl+OE4WvRSMkljAy9qFxLRl 39F3vgQ5B8MtWxvfDTmYR8c= X-Google-Smtp-Source: AMrXdXuM+eQPAfjUD8muf/JlVN/bgC1tf0TFyQVwItL0ab6htFwUMBrYpFKvVHqudp2qoac2e5SRIA== X-Received: by 2002:a5d:4bce:0:b0:2be:4ae1:215a with SMTP id l14-20020a5d4bce000000b002be4ae1215amr800131wrt.16.1674126338508; Thu, 19 Jan 2023 03:05:38 -0800 (PST) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id g2-20020a5d64e2000000b002be063f6820sm13877786wri.81.2023.01.19.03.05.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 03:05:37 -0800 (PST) From: Robert Pluim To: Daniel Mendler Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument In-Reply-To: <5bbc8220-6745-a123-a143-6b740caec8fa@daniel-mendler.de> (Daniel Mendler's message of "Thu, 19 Jan 2023 11:39:34 +0100") References: <878ri2gx3r.fsf@daniel-mendler.de> <87r0vtaxtu.fsf@gmail.com> <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> <87edrsb5o3.fsf@gmail.com> <9d95e891-22ad-d700-3fab-69948a8a1a17@daniel-mendler.de> <87o7qualwa.fsf@gmail.com> <17aa757a-935d-547c-b432-9529d1ed6d6b@daniel-mendler.de> <87k01iakxz.fsf@gmail.com> <5bbc8220-6745-a123-a143-6b740caec8fa@daniel-mendler.de> Date: Thu, 19 Jan 2023 12:05:36 +0100 Message-ID: <87bkmuainz.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60867 Cc: Eli Zaretskii , 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Thu, 19 Jan 2023 11:39:34 +0100, Daniel Mendler said: Daniel> On 1/19/23 11:16, Robert Pluim wrote: Daniel> Robert, speaking of `key-parse', I wonder why this function acc= epts Daniel> invalid key strings. Why don't we move the `key-valid-p' check = to Daniel> `key-parse'? This would alleviate the need for many additional Daniel> `key-valid-p' checks across keymap.el. One could maybe even get= rid of Daniel> the `keymap--check' helper. >>=20 >> Do you have an example of such an invalid string? Daniel> Just try something like this: Daniel> (key-valid-p "bug") Daniel> (key-parse "bug") Ah, the old "do we have to put spaces between keys" issue. I=CA=BCm not sure how best to deal with that, I=CA=BCll have to read through keymap.el some more. This: (keymap-set k "a" "bug") is already invalid, you have to write either (keymap-set k "a" "b u g") or (keymap-set k "a" (kmacro "b u g")) (I=CA=BCm still tempted to change `kbd' to *always* return a vector, even if all the characters are ASCII) >> I think it=CA=BCs too late to make such changes for emacs-29. I=CA= =BCm not even >> sure that the minimal changes I proposed will be accepted :-) Daniel> I don't think so since of all these functions are new. These se= em like Daniel> simple internal refactorings. Adding a NOERROR argument to key-= parse Daniel> seems like the least intrusive approach. I know emacs-29 hasn=CA=BCt been released yet, but changing a function to error by default when it didn=CA=BCt do previously seems risky. I=CA=BCll m= ake that change locally and see what happens. (Update: it did not go well, there are test-suite failures). Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 19 06:19:30 2023 Received: (at 60867) by debbugs.gnu.org; 19 Jan 2023 11:19:30 +0000 Received: from localhost ([127.0.0.1]:42775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pISx7-0004ig-Uh for submit@debbugs.gnu.org; Thu, 19 Jan 2023 06:19:30 -0500 Received: from server.qxqx.de ([178.63.65.180]:42341 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pISx5-0004iM-T1 for 60867@debbugs.gnu.org; Thu, 19 Jan 2023 06:19:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: 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=ntbjwhEXkGC+XQvR5DZMXO55fQLU2xvbK/XjbBkBmLE=; b=PT0Cvqls160fx4DZfTwnP8r2Hn MR8TfO4dXlFN5oRU7R5M3WAZC1SQ771/QVnBAWHYiJvPK/DjosmgoP1GX7llqtVcZ5qavV621J3IZ 1c/TQvx4yX8ueMaH24+laWR9cGhMsBzYxbjAJwSh9GLbNY5Hh+NEC+gR9gtQAXmtEWS0=; Message-ID: Date: Thu, 19 Jan 2023 12:19:19 +0100 MIME-Version: 1.0 Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument Content-Language: en-US To: Robert Pluim References: <878ri2gx3r.fsf@daniel-mendler.de> <87r0vtaxtu.fsf@gmail.com> <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> <87edrsb5o3.fsf@gmail.com> <9d95e891-22ad-d700-3fab-69948a8a1a17@daniel-mendler.de> <87o7qualwa.fsf@gmail.com> <17aa757a-935d-547c-b432-9529d1ed6d6b@daniel-mendler.de> <87k01iakxz.fsf@gmail.com> <5bbc8220-6745-a123-a143-6b740caec8fa@daniel-mendler.de> <87bkmuainz.fsf@gmail.com> From: Daniel Mendler In-Reply-To: <87bkmuainz.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60867 Cc: Eli Zaretskii , 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 1/19/23 12:05, Robert Pluim wrote: >>>>>> On Thu, 19 Jan 2023 11:39:34 +0100, Daniel Mendler said: > > Daniel> On 1/19/23 11:16, Robert Pluim wrote: > Daniel> Robert, speaking of `key-parse', I wonder why this function accepts > Daniel> invalid key strings. Why don't we move the `key-valid-p' check to > Daniel> `key-parse'? This would alleviate the need for many additional > Daniel> `key-valid-p' checks across keymap.el. One could maybe even get rid of > Daniel> the `keymap--check' helper. > >> > >> Do you have an example of such an invalid string? > > Daniel> Just try something like this: > > Daniel> (key-valid-p "bug") > Daniel> (key-parse "bug") > > Ah, the old "do we have to put spaces between keys" issue. Iʼm not > sure how best to deal with that, Iʼll have to read through keymap.el > some more. This: My point is that it would be expected from `key-parse' that it is equally strict as the other keymap functions, otherwise we miss bugs where `key-parse' wasn't used properly. Furthermore we would avoid all these `key-valid-p` and `keymap--check' calls, as I mentioned. Of course `kbd' should stay as lax as it has always been. > >> I think itʼs too late to make such changes for emacs-29. Iʼm not even > >> sure that the minimal changes I proposed will be accepted :-) > > Daniel> I don't think so since of all these functions are new. These seem like > Daniel> simple internal refactorings. Adding a NOERROR argument to key-parse > Daniel> seems like the least intrusive approach. > > I know emacs-29 hasnʼt been released yet, but changing a function to > error by default when it didnʼt do previously seems risky. It is mostly used internally. There are only 9 call sites in the Emacs code. > Iʼll make > that change locally and see what happens. (Update: it did not go well, > there are test-suite failures). This is hardly an argument. You should check all the call sites and adjust accordingly. In particular `kbd' must pass 'noerror. I would expect this to be a pretty small patch given the small number of call sites. Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 19 06:27:15 2023 Received: (at 60867) by debbugs.gnu.org; 19 Jan 2023 11:27:15 +0000 Received: from localhost ([127.0.0.1]:42795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIT4c-00055J-TE for submit@debbugs.gnu.org; Thu, 19 Jan 2023 06:27:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIT4b-000554-CP for 60867@debbugs.gnu.org; Thu, 19 Jan 2023 06:27:13 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIT4V-0003jV-26; Thu, 19 Jan 2023 06:27:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=COSCKD2X5QIY4l7ZBPF+/Gt8wViJNDwh16GdXaUkkyU=; b=clXnODMr3HSq6sqxGDq8 ElQvuU2du0lgpEOOufxbly4hkJNLRcEIlaNMf3t3lOtBtUT+yJAIM7DdBtni4zFoF8kIVdoBmPDRM Y075Xds2bHLE/e6PsM/xcqvLr1htYSKhx4p6enWOCQbwQu0uxuzcS57MaaB+/qrIzFtMw5VlAiXAO NbCAr5/IoUGcNblX5lLLyfSp8SiftftXKZM18CyML884LiEZYRTj0RuNRq054//DSabYvZtqtVMz2 G+aHlP/hi9UX0TCPYLJU1CGmyiEC0PN4HGegRr/oW8flxEYvRrPegDozzigcbQpY/6O32EcgDrzFH 5Udd4Hu9aqWUcA==; Received: from [87.69.77.57] (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 1pIT4U-0006Xx-EK; Thu, 19 Jan 2023 06:27:06 -0500 Date: Thu, 19 Jan 2023 13:27:02 +0200 Message-Id: <83bkmupxx5.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-Reply-To: <87fsc6ajt9.fsf@gmail.com> (message from Robert Pluim on Thu, 19 Jan 2023 11:40:50 +0100) Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument References: <878ri2gx3r.fsf@daniel-mendler.de> <87r0vtaxtu.fsf@gmail.com> <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> <87edrsb5o3.fsf@gmail.com> <9d95e891-22ad-d700-3fab-69948a8a1a17@daniel-mendler.de> <87o7qualwa.fsf@gmail.com> <83mt6ezuui.fsf@gnu.org> <87fsc6ajt9.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60867 Cc: mail@daniel-mendler.de, 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Robert Pluim > Cc: mail@daniel-mendler.de, 60867@debbugs.gnu.org > Date: Thu, 19 Jan 2023 11:40:50 +0100 > > >>>>> On Thu, 19 Jan 2023 12:23:17 +0200, Eli Zaretskii said: > > >> From: Robert Pluim > >> Cc: 60867@debbugs.gnu.org, Eli Zaretskii > >> Date: Thu, 19 Jan 2023 10:55:49 +0100 > >> > >> Eli, is this too much for emacs-29? > > Eli> I think this is fine, as all of those functions are new in Emacs 29, > Eli> right? > > Yes, theyʼre all new for emacs-29. Then patches to make them more consistent are okay, but please make sure you don't need to update the documentation (doc strings, NEWS, and the manuals). Thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 19 10:21:02 2023 Received: (at 60867) by debbugs.gnu.org; 19 Jan 2023 15:21:02 +0000 Received: from localhost ([127.0.0.1]:44453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIWir-0005YR-SO for submit@debbugs.gnu.org; Thu, 19 Jan 2023 10:21:02 -0500 Received: from mail-wm1-f43.google.com ([209.85.128.43]:51854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIWio-0005Xp-QZ for 60867@debbugs.gnu.org; Thu, 19 Jan 2023 10:21:00 -0500 Received: by mail-wm1-f43.google.com with SMTP id g10so1819537wmo.1 for <60867@debbugs.gnu.org>; Thu, 19 Jan 2023 07:20:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=f/nmWFNenkUjbgw9dfub40HGPxUj6m7cJzzXNisbb9Q=; b=mMRveXj+L6Y7G/jgUruM+QqB0iBwT1+OhP3uZWH3d1/yMF2e4mYXmJ80CPngQzOvEV mkQtVW5RCMjKS+4qCQvdhGfkMMBmBi7SIv4CYuXTix7iIo+x66T8X9YuP7TvnBQpPqLs 3jjB6IUBF7DshAovQKgvioA1NnHaIR8L1bnJm+SIlJ1VtayAHw3otE8GG2tnm910BNon AIpyAdnyERwNcOBrQOQpLx58LsF1doWFX9PIgowuwuAEl1ISc7Dh5Q/fXv20g+ZzSsZ7 4ZLiTcLc4/9ZUCSj4bDwKBMpuPwbBBQLAVpEE+CN76feRygI8NquhYjqFsdaiH43Ej+m kgTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f/nmWFNenkUjbgw9dfub40HGPxUj6m7cJzzXNisbb9Q=; b=p0DQBHCAyj/wfBM3Rm+4O9OCJrGw38NcmvN8QCGAJVu+8i/bdIa5QHuP7oH/RefKow CKA5oIzTXmbn0PZcF+Km5YurZvgN8KLQlZ+qCe+5QIDsp2BJVrmDEBEyLNWqZnp1NCci p+3ZxhpwZJPFU/108hO0i9Mxez9wRhmyrf93QS3edQxCgXq7N5NvjQyHXzi/IA6ggcbk m1u7nuyd+ggG3hvH3r+q82zmf0zaVoUGa6K/mxNHcciCobCXvqVvq5oA3D5mFdRVBZth N8LRTCqqpr7+FIzg4me+yYlfSSizXW00bT6cqCfmYhcoa0ES9tF4V3TcxCuWhPczu60v MJew== X-Gm-Message-State: AFqh2ko/D9enrvAIDJxrC744uy+njoXMYv9brZi1pbrdcCiXxt02sQK2 QVi9tzC0e9LRYrExjAR0Pso/1fiRIFY= X-Google-Smtp-Source: AMrXdXt1rABT0L9IKVfW0hcsY/rWm38NgAN//6diVY8WJR49ApZ8gMdUVgebUzEXKwRTPmcYpL6ucg== X-Received: by 2002:a05:600c:4b16:b0:3d2:2830:b8bb with SMTP id i22-20020a05600c4b1600b003d22830b8bbmr19059690wmp.34.1674141652250; Thu, 19 Jan 2023 07:20:52 -0800 (PST) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id be12-20020a05600c1e8c00b003db06224953sm6111951wmb.41.2023.01.19.07.20.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 07:20:51 -0800 (PST) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument In-Reply-To: <83bkmupxx5.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 19 Jan 2023 13:27:02 +0200") References: <878ri2gx3r.fsf@daniel-mendler.de> <87r0vtaxtu.fsf@gmail.com> <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> <87edrsb5o3.fsf@gmail.com> <9d95e891-22ad-d700-3fab-69948a8a1a17@daniel-mendler.de> <87o7qualwa.fsf@gmail.com> <83mt6ezuui.fsf@gnu.org> <87fsc6ajt9.fsf@gmail.com> <83bkmupxx5.fsf@gnu.org> Date: Thu, 19 Jan 2023 16:20:48 +0100 Message-ID: <87h6wm1rfz.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60867 Cc: mail@daniel-mendler.de, 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Thu, 19 Jan 2023 13:27:02 +0200, Eli Zaretskii said: >> From: Robert Pluim >> Cc: mail@daniel-mendler.de, 60867@debbugs.gnu.org >> Date: Thu, 19 Jan 2023 11:40:50 +0100 >>=20 >> >>>>> On Thu, 19 Jan 2023 12:23:17 +0200, Eli Zaretskii said: >>=20 >> >> From: Robert Pluim >> >> Cc: 60867@debbugs.gnu.org, Eli Zaretskii >> >> Date: Thu, 19 Jan 2023 10:55:49 +0100 >> >>=20 >> >> Eli, is this too much for emacs-29? >>=20 Eli> I think this is fine, as all of those functions are new in Emacs 2= 9, Eli> right? >>=20 >> Yes, they=CA=BCre all new for emacs-29. Eli> Then patches to make them more consistent are okay, but please make Eli> sure you don't need to update the documentation (doc strings, NEWS, Eli> and the manuals). The elisp manual needed adjusting, but not because of this change, the description of `keymap-set-after' was inaccurate. Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 19 10:27:52 2023 Received: (at 60867) by debbugs.gnu.org; 19 Jan 2023 15:27:52 +0000 Received: from localhost ([127.0.0.1]:44458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIWpT-0005kH-Q6 for submit@debbugs.gnu.org; Thu, 19 Jan 2023 10:27:52 -0500 Received: from mail-wm1-f54.google.com ([209.85.128.54]:46960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIWpR-0005k2-7Y for 60867@debbugs.gnu.org; Thu, 19 Jan 2023 10:27:50 -0500 Received: by mail-wm1-f54.google.com with SMTP id m5-20020a05600c4f4500b003db03b2559eso1517337wmq.5 for <60867@debbugs.gnu.org>; Thu, 19 Jan 2023 07:27:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=KRYTQ9OwDYQdk5EXUzTt+JuZ8QKdPmAzMQowDdM+/Cw=; b=SYHOEvy8jdCaGi5L6ft0JcsY0zhc9aH13/PRLcZJokNlURS/dnT8HZXS66sAVl/7xh stFj9bZtfiuMYsFRUi8HwOuo6g7EX+Te1QNg6hYbYOPAVgejbd64/tcchUb1AkqPc3UP JwAh7mVWXgVKOKjEj9wOY8CNxjgcviyk96KDnZ1V1cnzYmke8C9teMqcv8TPO1dAkQZL 6uXyRQdfpu5JDMb78MMAgk3J3yyKFVplg4WN2IXwtImxqM0ROpBeMb3iNQR1KQRC8mf1 wNkKKc6fZc9MQcuEt9SiiFg4dQG1CymMWddSPa7+Z0nrSzwr6pam8IJZkTsv7I2KF5T/ PX7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KRYTQ9OwDYQdk5EXUzTt+JuZ8QKdPmAzMQowDdM+/Cw=; b=3rQ945W5247NZZuT7ss3frwXom2L/a1IBWMZFEU4dqnmecVRD7V97wpOf2EjLRjZhK xHkKrEvr1v32RKOLqGxtsjSsSeciDEdYCiiF9vD3L+dnl7vatDi391FQJ/WhgJGcsRk5 mN49c2Fa48Eh9w+w+J3KHNwOevxB9bhUq+TwlCgzSO0JYeso0khpYL/cKj2hFO3nGo6d WeKpKkjcvbljclp74DPdj1ZIMySF30SlKQagS0Bu16Zv5rpwYvn/MGIKIAI4JAnAXgH7 3F/Ju1+FiadPFU0P8BFoNyXUqoHgUWOldNv1Y6sod0IewfSOzN3fIU0qI0x7ueon4sxB cTzw== X-Gm-Message-State: AFqh2kruoNSdFtp1ffpWS+MKaBzN412jyf6O4rH6mLHtrV2mnoJFxAJu N0OXc9Nd8GxkhqIdV2I1ll2QWBPnqvk= X-Google-Smtp-Source: AMrXdXtN27pP/SXMHde/wLaGcDjhSqWb9ENuM8NeTg5Tt8HJdgIrKQ9IgzTtDMgCikpOjalRnuBCsg== X-Received: by 2002:a05:600c:1e21:b0:3d0:7fee:8a70 with SMTP id ay33-20020a05600c1e2100b003d07fee8a70mr11011190wmb.19.1674142062880; Thu, 19 Jan 2023 07:27:42 -0800 (PST) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id d3-20020a05600c34c300b003dab77aa911sm4979212wmq.23.2023.01.19.07.27.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 07:27:42 -0800 (PST) From: Robert Pluim To: Daniel Mendler Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument In-Reply-To: (Daniel Mendler's message of "Thu, 19 Jan 2023 12:19:19 +0100") References: <878ri2gx3r.fsf@daniel-mendler.de> <87r0vtaxtu.fsf@gmail.com> <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> <87edrsb5o3.fsf@gmail.com> <9d95e891-22ad-d700-3fab-69948a8a1a17@daniel-mendler.de> <87o7qualwa.fsf@gmail.com> <17aa757a-935d-547c-b432-9529d1ed6d6b@daniel-mendler.de> <87k01iakxz.fsf@gmail.com> <5bbc8220-6745-a123-a143-6b740caec8fa@daniel-mendler.de> <87bkmuainz.fsf@gmail.com> Date: Thu, 19 Jan 2023 16:27:39 +0100 Message-ID: <87cz7a1r4k.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60867 Cc: Eli Zaretskii , 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Thu, 19 Jan 2023 12:19:19 +0100, Daniel Mendler said: Daniel> On 1/19/23 12:05, Robert Pluim wrote: Daniel> My point is that it would be expected from `key-parse' that it = is Daniel> equally strict as the other keymap functions, otherwise we miss= bugs Daniel> where `key-parse' wasn't used properly. Furthermore we would av= oid all Daniel> these `key-valid-p` and `keymap--check' calls, as I mentioned. `key-parse' should perhaps be renamed to `key--parse' as it=CA=BCs very much internal. Daniel> Of course `kbd' should stay as lax as it has always been. Daniel> It is mostly used internally. There are only 9 call sites in th= e Emacs code. >> I=CA=BCll make >> that change locally and see what happens. (Update: it did not go wel= l, >> there are test-suite failures). Daniel> This is hardly an argument. You should check all the call sites= and Daniel> adjust accordingly. In particular `kbd' must pass 'noerror. I w= ould Daniel> expect this to be a pretty small patch given the small number o= f call sites. The test suite shows what people=CA=BCs assumptions are, so such failures are valuable. It may be enough to use 'noerror in `kbd', indeed, but I haven=CA=BCt checked that yet. Or maybe the test suite needs adjusting. Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 19 10:38:48 2023 Received: (at 60867) by debbugs.gnu.org; 19 Jan 2023 15:38:48 +0000 Received: from localhost ([127.0.0.1]:44475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIX04-00064d-Fp for submit@debbugs.gnu.org; Thu, 19 Jan 2023 10:38:48 -0500 Received: from server.qxqx.de ([178.63.65.180]:48529 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIX03-00064N-H5 for 60867@debbugs.gnu.org; Thu, 19 Jan 2023 10:38:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: 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=cIqraowSOqjB9CFxLM+iHv/UKpdDxi4SX34L9r7PtNU=; b=KY0HLiy+S2mukITFSwYBe3NYA/ r3UTBLKlyNIgeqJK9DNBJMMmKESjnm8UN/XbhDnkvF2bdjnvQpqawUbHXeZ0XfSExR1TufcqUuOtP zsuE4M11N6mMLmHb7DOFGa1OoOCjVU5a/nYF0mwPhGXT/+8qTxGn5ax+y5MYC9XkmJ1A=; Message-ID: <6e8133ff-6cca-efcb-7748-4b983960b36a@daniel-mendler.de> Date: Thu, 19 Jan 2023 16:38:38 +0100 MIME-Version: 1.0 Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument To: Robert Pluim References: <878ri2gx3r.fsf@daniel-mendler.de> <87r0vtaxtu.fsf@gmail.com> <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> <87edrsb5o3.fsf@gmail.com> <9d95e891-22ad-d700-3fab-69948a8a1a17@daniel-mendler.de> <87o7qualwa.fsf@gmail.com> <17aa757a-935d-547c-b432-9529d1ed6d6b@daniel-mendler.de> <87k01iakxz.fsf@gmail.com> <5bbc8220-6745-a123-a143-6b740caec8fa@daniel-mendler.de> <87bkmuainz.fsf@gmail.com> <87cz7a1r4k.fsf@gmail.com> Content-Language: en-US From: Daniel Mendler In-Reply-To: <87cz7a1r4k.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60867 Cc: Eli Zaretskii , 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 1/19/23 16:27, Robert Pluim wrote: >>>>>> On Thu, 19 Jan 2023 12:19:19 +0100, Daniel Mendler said: > > Daniel> On 1/19/23 12:05, Robert Pluim wrote: > > Daniel> My point is that it would be expected from `key-parse' that it is > Daniel> equally strict as the other keymap functions, otherwise we miss bugs > Daniel> where `key-parse' wasn't used properly. Furthermore we would avoid all > Daniel> these `key-valid-p` and `keymap--check' calls, as I mentioned. > > `key-parse' should perhaps be renamed to `key--parse' as itʼs very > much internal. Yes, that would be another possibility. I also thought about that, but having key-parse public seems useful for packages. There should be an official way to convert from the string to the internal key representation. My only gripe with key-parse in its current form is really that it is not strict enough. Another possibility in case we don't want to introduce a NOERROR/LAX argument: key-parse (strict) calls key-valid-p and key--parse-lax kbd calls key--parse-lax > Daniel> Of course `kbd' should stay as lax as it has always been. > > Daniel> It is mostly used internally. There are only 9 call sites in the Emacs code. > > >> Iʼll make > >> that change locally and see what happens. (Update: it did not go well, > >> there are test-suite failures). > > Daniel> This is hardly an argument. You should check all the call sites and > Daniel> adjust accordingly. In particular `kbd' must pass 'noerror. I would > Daniel> expect this to be a pretty small patch given the small number of call sites. > > The test suite shows what peopleʼs assumptions are, so such failures > are valuable. It may be enough to use 'noerror in `kbd', indeed, but I > havenʼt checked that yet. Or maybe the test suite needs adjusting. Yes, of course. But I assume that in this case the failure is not coming from direct calls to key-parse but from calls to kbd etc. The key-parse itself doesn't seem to be really tested in the Emacs test suite. I also maintain a test suite as part of the Compat package for newly introduced APIs. There I also have tests, which could be upstreamed to the Emacs test suite if there is interest, since some functions lack tests there. See https://github.com/emacs-compat/compat/blob/master/compat-tests.el Daniel From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 20 11:12:06 2023 Received: (at 60867) by debbugs.gnu.org; 20 Jan 2023 16:12:06 +0000 Received: from localhost ([127.0.0.1]:46949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pItzp-00078T-Oq for submit@debbugs.gnu.org; Fri, 20 Jan 2023 11:12:06 -0500 Received: from mail-wm1-f47.google.com ([209.85.128.47]:54863) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pItzn-00077r-Dt; Fri, 20 Jan 2023 11:12:03 -0500 Received: by mail-wm1-f47.google.com with SMTP id m15so4479819wms.4; Fri, 20 Jan 2023 08:12:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=3FTkO1ICDISTXKIX3wtpsgN8XiEmOmyUsWBVcBzXSOA=; b=Bn8rnlpISzmOCP0G85cguqSZ5FxtzdF4rUM2f+tZGU3YbeovBQiJDvC4U/KYc5TINE pj+CrG6s5PBKGEsENUOAA+mlvqQpwVIxSb4HkGWxwCkWBDpsdMeGGKDcZQAbRHyHguCR OAFC1yOlpRhx2rhJGHWBfRBMQknbPym5cZfU2cgAuA5TSjZTCq+IvuhkHGNfptlD08D6 ZU4X9v7jKyndZwB6dYz9XLDb6ApPsr8YCbfqidxFehZ/hs1g9yTHCUjQMqO1gFFK6XnG Wi1vAWbQIPtlK2kA5jrKYVwMVSVZ/m9vGRRS95UhYDw6iNOplLaqvxq5nIsB0qXTJNbg VLaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3FTkO1ICDISTXKIX3wtpsgN8XiEmOmyUsWBVcBzXSOA=; b=cV3KZbEWJa9t5fA6kV8pNP7aDVooltN5X1ECHVKlAB20bc2th97CtHDLPrbG6732UX gwxQdt7RSn5IHqBUxgvUYORnrVAuJ66EAhiH6iKglyB5xT4GspT2W2NSiaourQhVE6Ze DD3A90al/nsHSMhyiK4JjRTXPaZKVEC0m3vBQxqjKclZKidzpSYRV+y4cYA7iRu3cTJM tAbHr3r2hcEcTmBsoCR4GGqxDch2tZKUZHY2Slyxy33P2Ct69K4d4lYs+MkjZrSqFPpM GrN5kox99cXgzyG6jhVQnYiOjBCGlL+ozuS957tP+BhHmAUD3f+548/SIZX5mHH1rnLf luCg== X-Gm-Message-State: AFqh2kraKwjr072ddWkWVBi/eYZ5a8lXixxMTaX1tvlgZcfAVZ1KAwmy 2gbCx3vPj9BkNfePvMxT1FmhnCYenLs= X-Google-Smtp-Source: AMrXdXs4GTsQ2JppbQVRsuWvJLHut70wBRmTekL4Xlh7ds+F7ZHKoG7GZO+ofQ6YZRdtqm81uGf8KA== X-Received: by 2002:a7b:c5cb:0:b0:3d3:4f99:bb32 with SMTP id n11-20020a7bc5cb000000b003d34f99bb32mr14149010wmk.36.1674231116273; Fri, 20 Jan 2023 08:11:56 -0800 (PST) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id p25-20020a1c7419000000b003d9f14e9085sm2632482wmc.17.2023.01.20.08.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 08:11:55 -0800 (PST) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#60867: 29.0.60; keymap-set-after does not accept the AFTER=t argument In-Reply-To: <87h6wm1rfz.fsf@gmail.com> (Robert Pluim's message of "Thu, 19 Jan 2023 16:20:48 +0100") References: <878ri2gx3r.fsf@daniel-mendler.de> <87r0vtaxtu.fsf@gmail.com> <3d2cc069-d258-f0b6-9679-eb13a1415202@daniel-mendler.de> <87edrsb5o3.fsf@gmail.com> <9d95e891-22ad-d700-3fab-69948a8a1a17@daniel-mendler.de> <87o7qualwa.fsf@gmail.com> <83mt6ezuui.fsf@gnu.org> <87fsc6ajt9.fsf@gmail.com> <83bkmupxx5.fsf@gnu.org> <87h6wm1rfz.fsf@gmail.com> Date: Fri, 20 Jan 2023 17:11:55 +0100 Message-ID: <87o7qtyylw.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60867 Cc: mail@daniel-mendler.de, 60867@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 60867 fixed close 60867 29.1 quit >>>>> On Thu, 19 Jan 2023 16:20:48 +0100, Robert Pluim s= aid: >>>>> On Thu, 19 Jan 2023 13:27:02 +0200, Eli Zaretskii said: >>> From: Robert Pluim >>> Cc: mail@daniel-mendler.de, 60867@debbugs.gnu.org >>> Date: Thu, 19 Jan 2023 11:40:50 +0100 >>>=20 >>> >>>>> On Thu, 19 Jan 2023 12:23:17 +0200, Eli Zaretskii said: >>>=20 >>> >> From: Robert Pluim >>> >> Cc: 60867@debbugs.gnu.org, Eli Zaretskii >>> >> Date: Thu, 19 Jan 2023 10:55:49 +0100 >>> >>=20 >>> >> Eli, is this too much for emacs-29? >>>=20 Eli> I think this is fine, as all of those functions are new in Emacs 2= 9, Eli> right? >>>=20 >>> Yes, they=CA=BCre all new for emacs-29. Eli> Then patches to make them more consistent are okay, but please make Eli> sure you don't need to update the documentation (doc strings, NEWS, Eli> and the manuals). Robert> The elisp manual needed adjusting, but not because of this chan= ge, the Robert> description of `keymap-set-after' was inaccurate. Anyway, I=CA=BCve pushed the fix for this issue whilst I think about Daniel=CA=BCs points about `key-parse'. Robert --=20 Closing. Committed as c7e02eaa3d From unknown Sun Jun 15 08:17:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 18 Feb 2023 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator