From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning Date: Sat, 19 Dec 2020 21:17:31 +0200 Message-ID: <838s9ttxkk.fsf@gnu.org> References: <<<<6c4f5089-43fa-4ca1-a656-1ec1684df960@default>>>> <<<<87v9d67ox6.fsf@gnus.org>>>> <<<<70cc884d-4f32-4a2e-b3f5-181709f2ca29@default>>>> <<<<83blexeod5.fsf@gnu.org>>>> <<>> <<<83v9d5d1yd.fsf@gnu.org>>> <<846fcdf8-9b51-4246-8200-b067e7006e24@default>> <<83y2hut6m7.fsf@gnu.org>> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12731"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, monnier@iro.umontreal.ca, 24237-done@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 19 20:29:08 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kqhue-0003Ch-3b for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 20:29:08 +0100 Original-Received: from localhost ([::1]:60142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqhud-0003al-4m for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 14:29:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqhjv-0007N0-5E for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 14:18:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59879) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kqhju-0007lq-LG for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 14:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kqhju-0002bl-Ff for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 14:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Dec 2020 19:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24237 X-GNU-PR-Package: emacs Original-Received: via spool by 24237-done@debbugs.gnu.org id=D24237.160840548010016 (code D ref 24237); Sat, 19 Dec 2020 19:18:02 +0000 Original-Received: (at 24237-done) by debbugs.gnu.org; 19 Dec 2020 19:18:00 +0000 Original-Received: from localhost ([127.0.0.1]:43192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqhjr-0002bU-T4 for submit@debbugs.gnu.org; Sat, 19 Dec 2020 14:18:00 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqhjq-0002bI-2r for 24237-done@debbugs.gnu.org; Sat, 19 Dec 2020 14:17:58 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60061) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqhjk-0007lD-Ro; Sat, 19 Dec 2020 14:17:52 -0500 Original-Received: from [176.228.60.248] (port=4287 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kqhjj-0005bG-PJ; Sat, 19 Dec 2020 14:17:52 -0500 In-Reply-To: (message from Drew Adams on Sat, 19 Dec 2020 10:54:06 -0800 (PST)) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:196418 Archived-At: > Date: Sat, 19 Dec 2020 10:54:06 -0800 (PST) > From: Drew Adams > Cc: larsi@gnus.org, 24237@debbugs.gnu.org, monnier@iro.umontreal.ca > > > > > > "use of a `menu-item' construct with a :filter > > > > > to create a conditional _keyboard_ key binding. > > > > > In such a case, the `menu-item' construct is not > > > > > a real menu item - it is not placed on any menu." > > > > If this is never placed on the menu bar or on any pop-down menu, then > > what the manual says is not relevant, because redisplay only considers > > the menus that need to be displayed. > > 1. The manual's description of :filter is entirely > relevant to this use case - _except_ for that last > paragraph, which apparently erroneously assumes that > the only possible use of an extended menu item with > :filter is in a menu. Since that last paragraph explicitly talks about displaying or acting on menus, I see no reason to change anything there. > a. You can bind an extended menu item that uses > :filter to a keyboard key, to give it a > dynamic binding (explaining what that means > with an example). IMO this is a kludge that we don't need to document. > More generally, `menu-item' is not just about menus > and menu items. This is not obvious. And in > particular, it's not obvious that you can make good > use of :filter with a keyboard key. menu-item is about menus, as its name says. That it can be used for other purposes is an implementation detail. And with that, I'm closing this bug report.