From unknown Sun Jun 22 07:31:00 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#69893 <69893@debbugs.gnu.org> To: bug#69893 <69893@debbugs.gnu.org> Subject: Status: 29.2; Valid key "" not accepted by `keymap-global-set' Reply-To: bug#69893 <69893@debbugs.gnu.org> Date: Sun, 22 Jun 2025 14:31:00 +0000 retitle 69893 29.2; Valid key "" not accepted by `keymap-global-set' reassign 69893 emacs submitter 69893 tpeplt severity 69893 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 19 00:05:16 2024 Received: (at submit) by debbugs.gnu.org; 19 Mar 2024 04:05:16 +0000 Received: from localhost ([127.0.0.1]:36018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmQix-0006pG-Cm for submit@debbugs.gnu.org; Tue, 19 Mar 2024 00:05:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:48946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmKJv-0002er-Mx for submit@debbugs.gnu.org; Mon, 18 Mar 2024 17:15:00 -0400 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 1rmKJI-00042E-W7 for bug-gnu-emacs@gnu.org; Mon, 18 Mar 2024 17:14:21 -0400 Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmKJH-0001Ge-Lt for bug-gnu-emacs@gnu.org; Mon, 18 Mar 2024 17:14:20 -0400 Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-6917352b3f1so16731916d6.1 for ; Mon, 18 Mar 2024 14:14:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710796458; x=1711401258; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=UxXGs3b/CoCVfPbl6+kXtbek7JTcMgTqDbXZbQKvjek=; b=mCY6toMgzrqxGAyIXCUIBsazBaFhCZPRjpbITZsKqKqBBp6vId4WnI1oQoKnprPJY2 RAIEJC8UTLk4Rm+gXXAGtrqE4oWtsGlmmx03cunEKsZJUoi/On5/cbAyjO4aiKZI6e4W zI/4lG9IV+oAfRTVeq2VyEBtGXOG2hQchUk4VIoJ62+URVQSzVwltHpqCcvqckl4uOJL +9ISIQA0Mgd/CZdbpv/OKJwndw4BTcopTbGHgQyN5vm+Y4BIVG8HVMIHiHm9UhgFrLx6 amnC9wACMtwXgWk8rAAJlrLQ1HppEJJuCzUJxutgAgYqsixKmJ4WfQi0EX7CY+1eky7q MY8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710796458; x=1711401258; h=content-transfer-encoding:mime-version:user-agent:message-id:date :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=UxXGs3b/CoCVfPbl6+kXtbek7JTcMgTqDbXZbQKvjek=; b=msOkCKtA8+POr48JbBTRLfFiSywxmPxiz/6UKc3oy0u6QTWaXOXjK7/w3tYKSy//Yo 8gCnIMkcWSwcT9/Ex7gY73Cs+N/D1rSayHcgsJDqvg7uFJtsbET3zEUWKNS4sEiwNrfj cjNq+mvaXvGXkVCGMj3CB1Sl2ihSY3IT2DJ+PgqSv7qYoh230bF/f5JhHmDxFp9fD031 BQfWU1Zt/s/TLzvv3rPKhqDu1sgzx4wDBCgU5TmmHjeMVP29xWcBdV+5KIuIiltYt1fq sa5zl7LImMic7OLUo4Avl49UJ0wxUJnzHwZVO0o4zAZAghKYHE6Bu5e+N0MLJjvVf4rx Q1tg== X-Gm-Message-State: AOJu0YyAANuuiToF5g31P+i+4nrjCW0fi6BXR6S1Ud35okkUm3wKZoIR 4nB+5Bhq8IYljn6Q8L/D7x4u05Llv/hC/XblGYt9WNvpwdLzWYl0YP/Kk35YwIg= X-Google-Smtp-Source: AGHT+IEFEHF+qA2I6YBQcoUdkHeLZ+7/kj8dGvvDeZapULle8Hdr2pPr/SEQoaM5Yc4dRR2866IohA== X-Received: by 2002:a0c:c788:0:b0:696:f53:bb00 with SMTP id k8-20020a0cc788000000b006960f53bb00mr6563173qvj.18.1710796458525; Mon, 18 Mar 2024 14:14:18 -0700 (PDT) Received: from t530.local ([2600:8806:a821:2b00::ea1e]) by smtp.gmail.com with ESMTPSA id o6-20020a0562140e4600b00690c963f1a4sm5641376qvc.107.2024.03.18.14.14.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 14:14:17 -0700 (PDT) From: tpeplt To: bug-gnu-emacs@gnu.org Subject: 29.2; Valid key "" not accepted by `keymap-global-set' Date: Mon, 18 Mar 2024 17:14:16 -0400 Message-ID: <87plvr9r9z.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::f29; envelope-from=tpeplt@gmail.com; helo=mail-qv1-xf29.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 19 Mar 2024 00:05:11 -0400 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.3 (--) Recipe for reproducing this problem: 1. Start Emacs at a shell prompt using "emacs -Q". 2. Evaluate the following expressions in the *scratch* buffer. The following keys evaluate as valid (as expected): (key-valid-p "TAB") (key-valid-p "") (key-valid-p "") The following key evaluates as invalid (as expected): (key-valid-p "tab") 3. So, the following expressions should evaluate to =E2=80=98indent-for-tab-command=E2=80=99: (keymap-global-set "" 'indent-for-tab-command) (keymap-global-set "TAB" 'indent-for-tab-command) (keymap-global-set "" 'indent-for-tab-command) The first two expressions evaluate as expected, but when the third expression is evaluated, then the following message is reported: keymap-global-set: To bind the key TAB, use [?\t], not [TAB] Because (key-valid-p "") evaluates to t, that error message appears to be invalid. 4. Also, the following expressions all evaluate to nil: (key-valid-p "[?\t]") (key-valid-p "[?\\t]") (key-valid-p "?\t") (key-valid-p "?\\t") (key-valid-p "") (key-valid-p "") So the error message appears to direct a user to change the key string to an invalid key. -- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 21 08:37:05 2024 Received: (at 69893) by debbugs.gnu.org; 21 Mar 2024 12:37:05 +0000 Received: from localhost ([127.0.0.1]:35322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnHfN-00028R-4N for submit@debbugs.gnu.org; Thu, 21 Mar 2024 08:37:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnHfI-00027q-GG for 69893@debbugs.gnu.org; Thu, 21 Mar 2024 08:37:03 -0400 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 1rnHeY-0003Z4-DY; Thu, 21 Mar 2024 08:36:14 -0400 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=uKM3txeHvas4zyj2KZw8thudp5NVGk/ZRp+tROReU84=; b=fdyu+7G/3xnON1n7cfMs dey+30c1iT+F41UZjOCQen2tAXIkZcX4WnfxK6/GeDTHqd+7otOmkWC1+wyZVFcOEqewONIDZvAFq fWdoWrAa758krPyidyp/i8S3TO4DRyr06LZucZXvd/oyh4cR9BSVyrgwxkOzleH53aOGS1CXYpJFO TQ/23JW4dtlLjIQpgmbMfhXQjgllcGggxwHDGn179gkyjUv2KWn2Puf3iIXNUFP3C2Y4XSTbrR6dW JrNErT26khfFq2X2zPQkkgr+Ee7yVm9xW90gj4vs0qyesZ0Ea0ip2N0m17FGH8LmZJ7BD+r5fyfYb e9P1tiFgj5SNCA==; Date: Thu, 21 Mar 2024 14:36:10 +0200 Message-Id: <86wmpv224l.fsf@gnu.org> From: Eli Zaretskii To: tpeplt , Stefan Monnier In-Reply-To: <87plvr9r9z.fsf@gmail.com> (message from tpeplt on Mon, 18 Mar 2024 17:14:16 -0400) Subject: Re: bug#69893: 29.2; Valid key "" not accepted by `keymap-global-set' References: <87plvr9r9z.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 69893 Cc: 69893@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.5 (-) > From: tpeplt > Date: Mon, 18 Mar 2024 17:14:16 -0400 > > Recipe for reproducing this problem: > > 1. Start Emacs at a shell prompt using "emacs -Q". > > 2. Evaluate the following expressions in the *scratch* buffer. > > The following keys evaluate as valid (as expected): > > (key-valid-p "TAB") > (key-valid-p "") > (key-valid-p "") > > The following key evaluates as invalid (as expected): > > (key-valid-p "tab") > > 3. So, the following expressions should evaluate to > ‘indent-for-tab-command’: > > (keymap-global-set "" 'indent-for-tab-command) > (keymap-global-set "TAB" 'indent-for-tab-command) > (keymap-global-set "" 'indent-for-tab-command) > > The first two expressions evaluate as expected, but when the third > expression is evaluated, then the following message is reported: > > keymap-global-set: To bind the key TAB, use [?\t], not [TAB] > > Because (key-valid-p "") evaluates to t, that error message appears > to be invalid. > > 4. Also, the following expressions all evaluate to nil: > > (key-valid-p "[?\t]") > (key-valid-p "[?\\t]") > > (key-valid-p "?\t") > (key-valid-p "?\\t") > > (key-valid-p "") > (key-valid-p "") > > So the error message appears to direct a user to change the key string > to an invalid key. Stefan, is the below the right fix for this? If not, why does key-parse omit TAB from the list of specially-handled keys? diff --git a/lisp/keymap.el b/lisp/keymap.el index d2544e3..b2b475c 100644 --- a/lisp/keymap.el +++ b/lisp/keymap.el @@ -260,7 +260,7 @@ key-parse (setq word (concat (match-string 1 word) (match-string 3 word))) (not (string-match - "\\<\\(NUL\\|RET\\|LFD\\|ESC\\|SPC\\|DEL\\)$" + "\\<\\(NUL\\|RET\\|LFD\\|TAB\\|ESC\\|SPC\\|DEL\\)$" word)))) (setq key (list (intern word)))) ((or (equal word "REM") (string-match "^;;" word)) From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 21 15:47:08 2024 Received: (at 69893) by debbugs.gnu.org; 21 Mar 2024 19:47:08 +0000 Received: from localhost ([127.0.0.1]:56916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnONX-0006vl-TF for submit@debbugs.gnu.org; Thu, 21 Mar 2024 15:47:08 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:59639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnONV-0006v3-W3 for 69893@debbugs.gnu.org; Thu, 21 Mar 2024 15:47:06 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id BAE5E80E77; Thu, 21 Mar 2024 15:46:17 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1711050376; bh=n0k7l1OG69uHL/52UGE/Rl2l9RS18eXqPING3Yq2sO0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=SLJyFXLMW62kIGlLOJFCxsh3W0yiSdxTMUq0x07O1rEf0IIVkvYncbqL3B1rHXb1j OMgrnXvibLs5b4D0EICpuM27cDWe3t+ukwoId8CNoxO5VETSphDPKtfu5OXx2Y1TDG EMLlZub19UZkWkGkvQGcUxLyaKRUyRVoA3UvTtTpG5yTqoaniPBelDbOoqTmi6rVbr ilCodgQVB2dc6F7rxToOKx7CneZAR1NsilrP0Tc5ybnSHJfoKjfrVBtdO1rEY9l3eG OgJv4SKdSmV9Dd9LNO50EbmLjyUF+VgBbFaJfeaXszFe5zao8OwaoRWXiUAQ+3tARq fwctQlGgbxLmg== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 24BB780A95; Thu, 21 Mar 2024 15:46:16 -0400 (EDT) Received: from pastel (unknown [104.247.238.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id F05701201BF; Thu, 21 Mar 2024 15:46:15 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#69893: 29.2; Valid key "" not accepted by `keymap-global-set' In-Reply-To: <86wmpv224l.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 21 Mar 2024 14:36:10 +0200") Message-ID: References: <87plvr9r9z.fsf@gmail.com> <86wmpv224l.fsf@gnu.org> Date: Thu, 21 Mar 2024 15:46:08 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.242 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69893 Cc: 69893@debbugs.gnu.org, tpeplt 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 (---) > Stefan, is the below the right fix for this? Looks correct to me. That code dates back to commit 629d4dcd2a184da6a0b246d31f152a84327db51a Author: Richard M. Stallman Date: Tue Sep 21 03:44:04 1993 +0000 Total rewrite by Gillespie. and I suspect it was just an oversight. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 21 16:14:47 2024 Received: (at 69893-done) by debbugs.gnu.org; 21 Mar 2024 20:14:48 +0000 Received: from localhost ([127.0.0.1]:59189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnOoJ-0008OI-B5 for submit@debbugs.gnu.org; Thu, 21 Mar 2024 16:14:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnOoH-0008Nv-Bs for 69893-done@debbugs.gnu.org; Thu, 21 Mar 2024 16:14:46 -0400 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 1rnOnX-0006Sh-Ow; Thu, 21 Mar 2024 16:13:59 -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=ORWaN7ZJh5qRl1gl3zrnibOM9JIjHta4yowwpf10KlE=; b=R77jP35ggm1p H8GMcmzYl3nChvyt/sTNKziz+NfNz46s4B77Ifu4FKG8Yr/Jucuv/veXKgS02jW7eEA8MtU39b18v McWcqZZMhkQP0AJBWp//h9CQIB+PaEBIw+1n4Qu868RsQ4w8lyd9MCY+OFmRbYj7cVOhPYUukmtjj wM4h7mJHTrTG/F3VaosO/dhAyYvsJ5hYMfShxQtQWs0seelFIgvm0L9DNRXp2Qa9YeP+H21yQV1Rb CjM2EnFnwNcBcWqO6OipPIhy/m9YEVj3Kn+dF4KfnsqtXAdk29XEjA1i/Vy/0Pi1kFvXcA0W0wWAm 8BMeCsxeQCIvSfyE+bascg==; Date: Thu, 21 Mar 2024 22:13:52 +0200 Message-Id: <86il1f1gxr.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (message from Stefan Monnier on Thu, 21 Mar 2024 15:46:08 -0400) Subject: Re: bug#69893: 29.2; Valid key "" not accepted by `keymap-global-set' References: <87plvr9r9z.fsf@gmail.com> <86wmpv224l.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69893-done Cc: 69893-done@debbugs.gnu.org, tpeplt@gmail.com 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: Stefan Monnier > Cc: tpeplt , 69893@debbugs.gnu.org > Date: Thu, 21 Mar 2024 15:46:08 -0400 > > > Stefan, is the below the right fix for this? > > Looks correct to me. > That code dates back to > > commit 629d4dcd2a184da6a0b246d31f152a84327db51a > Author: Richard M. Stallman > Date: Tue Sep 21 03:44:04 1993 +0000 > > Total rewrite by Gillespie. > > and I suspect it was just an oversight. Thanks, installed on the emacs-29 branch, and closing the bug. From unknown Sun Jun 22 07:31:00 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 19 Apr 2024 11:24:25 +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