From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning Date: Sat, 19 Dec 2020 11:35:45 -0800 (PST) Message-ID: <9db900ad-aec6-4000-8537-a43d781c458e@default> 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>>> <> <<838s9ttxkk.fsf@gnu.org>> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10196"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, monnier@iro.umontreal.ca, 24237-done@debbugs.gnu.org To: Eli Zaretskii , Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 19 20:38:03 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 1kqi3H-0002ZS-Ms for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 20:38:03 +0100 Original-Received: from localhost ([::1]:40128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqi3G-0007Xw-Ik for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 14:38:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqi2I-0007VM-0t for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 14:37:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59894) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kqi2H-0005ZP-Q5 for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 14:37:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kqi2H-00035j-Nh for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 14:37:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Dec 2020 19:37:01 +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.160840656211807 (code D ref 24237); Sat, 19 Dec 2020 19:37:01 +0000 Original-Received: (at 24237-done) by debbugs.gnu.org; 19 Dec 2020 19:36:02 +0000 Original-Received: from localhost ([127.0.0.1]:43207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqi1K-00034N-5b for submit@debbugs.gnu.org; Sat, 19 Dec 2020 14:36:02 -0500 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:55754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqi1G-00033r-Ms for 24237-done@debbugs.gnu.org; Sat, 19 Dec 2020 14:36:01 -0500 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BJJXxpq172186; Sat, 19 Dec 2020 19:35:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=hr+ePstgAQx5B+5xEvGb52Unt9lzzEeONHPSuLs9r4c=; b=rHxauZY6RkaLepWISl08wZpRQtHBvIElu2S17SnF2NyODGyUXKxkzOUbjrx2Y+KUQhpu VoUbysfckmKqqwWPJAqrAxhgZWLC6PTieWLhKfcPJtAn4CWEkzGNNBgc0u6Bnf+dpoRh c4+6vvaEzyt0lX8gFW4HD7HJqxPp4gNOwefdDXYD9aTZlLGxgvpGPpDEtk6DPUy5u1lo jPajyi1iNdFlDzZReGa2nvp7lexzfT/iRSTT5x76jzHmsGNzkrZr+IQWyCJ8q88Bn1l7 85FaaBpOiuLcHQiQ6YlY1r2dMrXB3klMWMdtRTl5SJ125vu9RPgZ7UNIg7Lwf7KgwiH8 bA== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 35h9fks8sv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 19 Dec 2020 19:35:49 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BJJUPLo063746; Sat, 19 Dec 2020 19:35:48 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 35h6ms34t7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 19 Dec 2020 19:35:48 +0000 Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0BJJZk5u023242; Sat, 19 Dec 2020 19:35:47 GMT In-Reply-To: <<838s9ttxkk.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5071.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9839 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 bulkscore=0 phishscore=0 malwarescore=0 spamscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012190145 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9839 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 impostorscore=0 lowpriorityscore=0 bulkscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 adultscore=0 clxscore=1011 spamscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012190146 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:196420 Archived-At: > > > > > > "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 consider= s > > > 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. >=20 > Since that last paragraph explicitly talks about displaying or acting > on menus, I see no reason to change anything there. >=20 > > 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). >=20 > IMO this is a kludge that we don't need to document. It is indeed a kludge/workaround/hack. It is also quite useful. If you refuse to elevate it to doc-worthiness, then please change this bug to an enhancement request to provide the same feature _without_ having to use `menu-item' with :filter. Otherwise, I will I guess submit such an enhancement request. Elisp users shouldn't have to resort to an undocumented kludge to get this useful behavior. > > 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. >=20 > menu-item is about menus, as its name says. That it can be used for > other purposes is an implementation detail. >=20 > And with that, I'm closing this bug report. Ta da.