From unknown Sat Jun 21 03:30:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24236: 25.1.50; `substitute-command-keys', \{...}: optionally show menu items Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Aug 2016 17:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24236 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 24236@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14712813484614 (code B ref -1); Mon, 15 Aug 2016 17:16:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Aug 2016 17:15:48 +0000 Received: from localhost ([127.0.0.1]:58506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZLUJ-0001CM-MJ for submit@debbugs.gnu.org; Mon, 15 Aug 2016 13:15:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52107) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZLUI-0001CA-7I for submit@debbugs.gnu.org; Mon, 15 Aug 2016 13:15:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bZLUC-0007if-31 for submit@debbugs.gnu.org; Mon, 15 Aug 2016 13:15:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=BAYES_50,XPRIO autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZLUB-0007iU-Vu for submit@debbugs.gnu.org; Mon, 15 Aug 2016 13:15:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZLU9-00019A-Nu for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2016 13:15:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bZLU5-0007hl-Hy for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2016 13:15:37 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:28607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZLU5-0007hh-6u for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2016 13:15:33 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u7FHFWm3000997 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 15 Aug 2016 17:15:32 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id u7FHFWVS025118 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 15 Aug 2016 17:15:32 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u7FHFVJh018823 for ; Mon, 15 Aug 2016 17:15:31 GMT MIME-Version: 1.0 Message-ID: Date: Mon, 15 Aug 2016 10:15:29 -0700 (PDT) From: Drew Adams X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6753.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.0 (--) 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: -4.0 (----) Enhancement request. Add an optional arg to `substitute-command-keys'. When present (non-nil) it would cause \{...} to include menu items. IOW, when `substitute-command-keys' makes use of `describe-bindings' (or equivalent), if the optional arg is non-nil then it would use `describe-buffer-bindings', in effect, passing it a non-nil MENUS argument. This gives callers of `substitute-command-keys' the possibility of including menu items in a listing of keymap bindings. In particular, it lets them show keys that are conditionally bound to commands in a given map - bindings that are defined using `menu-item' with a :filter - keys, such as this: (define-key some-map (kbd "some-keys") '(menu-item "" nil :filter (lambda (&rest _) (and (some-condition) #'some-command)))) Such conditional bindings are typically made for keyboard keys. But the fact that they make use of an Emacs-Lisp idiom that defines them using `menu-item' means that `substitute-command-keys' always filters them out. It should be possible to prevent filtering them out. (If things like `substitute-command-keys', `describe-bindings', and `describe-buffer-bindings' were defined in Lisp and not C, Lisp users could themselves take care of such a request. Please consider moving such things to Lisp, unless there is a real reason they need to be in C. I don't imagine that performance is a real reason in this case, nowadays.) In GNU Emacs 25.1.50.1 (i686-pc-mingw32) of 2015-12-10 Repository revision: 6148555ee5a3d0139ae517803718b3e0357933c7 Windowing system distributor 'Microsoft Corp.', version 6.1.7601 Configured using: 'configure --prefix=3D/c/Devel/emacs/snapshot/trunk --enable-checking=3Dye= s --enable-check-lisp-object-type --without-compress-install 'CFLAGS=3D-Og -ggdb3' LDFLAGS=3D-Lc:/Devel/emacs/lib 'CPPFLAGS=3D-DGC_MCHECK=3D1 -Ic:/Devel/emacs/include'' From unknown Sat Jun 21 03:30:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24236: 25.1.50; `substitute-command-keys', \{...}: optionally show menu items Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 May 2022 13:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24236 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 24236@debbugs.gnu.org Received: via spool by 24236-submit@debbugs.gnu.org id=B24236.16524500785006 (code B ref 24236); Fri, 13 May 2022 13:55:01 +0000 Received: (at 24236) by debbugs.gnu.org; 13 May 2022 13:54:38 +0000 Received: from localhost ([127.0.0.1]:43259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npVkc-0001Ig-9K for submit@debbugs.gnu.org; Fri, 13 May 2022 09:54:38 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npVka-0001IM-Ou for 24236@debbugs.gnu.org; Fri, 13 May 2022 09:54:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=p7YvV41QJKpLJvlsOvwdVTT9oHeBEtaChcz1mVpqwuM=; b=TByLenaZy1+rdCBeq0sPzQJ822 QKG3XVMSwqyI41gPdIIM0VWIBiUEd7qq9yO6buL2LLWQsh5w/Amh50NfW+JCzVriasMSq7IkPP/Ko z6q6DmAhg4vUNTBQKDDM1EBtZ55Urk1TdLs2cqcLAjkIxgaiYHunAvYg+LlwLDXkRZQI=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1npVkR-0001Fl-6k; Fri, 13 May 2022 15:54:29 +0200 From: Lars Ingebrigtsen References: X-Now-Playing: Tom Tom Club's _Close To The Bone_: "Pleasure Of Love" Date: Fri, 13 May 2022 15:54:26 +0200 In-Reply-To: (Drew Adams's message of "Mon, 15 Aug 2016 10:15:29 -0700 (PDT)") Message-ID: <87czghtu5p.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Drew Adams writes: > Add an optional arg to `substitute-command-keys'. When present > (non-nil) it would cause \{...} to include menu items. I've now added this to Emacs 29. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Drew Adams writes: > Add an optional arg to `substitute-command-keys'. When present > (non-nil) it would cause \{...} to include menu items. I've now added this to Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 09:54:56 2022 Received: (at control) by debbugs.gnu.org; 13 May 2022 13:54:56 +0000 Received: from localhost ([127.0.0.1]:43262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npVkf-0001Iw-G5 for submit@debbugs.gnu.org; Fri, 13 May 2022 09:54:56 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npVke-0001IU-0X for control@debbugs.gnu.org; Fri, 13 May 2022 09:54:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type: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=NiZy7O8e9YfTU9PayqvCf221/FRVAyORDfZhWWSwgH4=; b=qojpuyML31gbfmw0jveJB+MzhZ 6fTBpNkuY74SL5GYK3daGPx5Al28X2jBdfVcGhsl7Rk1sBYomQTWDmdBXpB6rXBV40upRwEKHwTDp TSGPyM9rNDtzKW2UM0AShj1tWdhTB/mcprbTr6Y0Hxc5QcHiQ2Mzkp/p3ed8HQD4rmPY=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1npVkW-0001Fu-IZ for control@debbugs.gnu.org; Fri, 13 May 2022 15:54:34 +0200 Date: Fri, 13 May 2022 15:54:32 +0200 Message-Id: <87bkw1tu5j.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #24236 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 24236 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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 (-) close 24236 29.1 quit