From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 15 14:06:52 2016 Received: (at submit) by debbugs.gnu.org; 15 Aug 2016 18:06:52 +0000 Received: from localhost ([127.0.0.1]:58518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZMHj-0002T0-Vx for submit@debbugs.gnu.org; Mon, 15 Aug 2016 14:06:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZMHi-0002Sm-1o for submit@debbugs.gnu.org; Mon, 15 Aug 2016 14:06:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bZMHb-0000cO-If for submit@debbugs.gnu.org; Mon, 15 Aug 2016 14:06:44 -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]:35374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZMHb-0000cF-Fn for submit@debbugs.gnu.org; Mon, 15 Aug 2016 14:06:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZMHZ-0006Rd-BP for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2016 14:06:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bZMHU-0000aq-9i for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2016 14:06:41 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:20461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZMHU-0000aZ-19 for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2016 14:06:36 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u7FI6XCC031461 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 15 Aug 2016 18:06:34 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.13.8) with ESMTP id u7FI6Xkw004856 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 15 Aug 2016 18:06:33 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u7FI6W2j029458 for ; Mon, 15 Aug 2016 18:06:32 GMT MIME-Version: 1.0 Message-ID: <6c4f5089-43fa-4ca1-a656-1ec1684df960@default> Date: Mon, 15 Aug 2016 11:06:31 -0700 (PDT) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 24.5; (elisp)`Extended Menu Items', :filter warning 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: userv0022.oracle.com [156.151.31.74] 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-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: -4.0 (----) The doc for :filter says this about the FILTER-FN: Emacs can call this function at any time that it does redisplay or operates on menu data structures, so you should write it so it can safely be called at any time. Is this true in general, or only when the extended menu item is put on a menu? A common idiom is to make 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. I'm guessing that in such a case this doc paragraph does not apply. If this guess is correct then please correct the paragraph, so that it says something like "If an extended menu item that uses :filter is placed on a menu then Emacs can call FILTER-FN when...". Also, is it really the case that FILTER-FN can be called anytime Emacs does redisplay? Shouldn't the doc say only that it can be called anytime Emacs "operates on menu data structures"? Does it get called by redisplay other than when redisplay operates on menu data structures? In the case mentioned above (binding to a keyboard key), would FILTER-FN ever be called during redisplay? I'm guessing that it would not. In GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/usr --host=3Di686-pc-mingw32' From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 12 15:25:06 2020 Received: (at 24237) by debbugs.gnu.org; 12 Dec 2020 20:25:06 +0000 Received: from localhost ([127.0.0.1]:46794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koBRy-0001bL-56 for submit@debbugs.gnu.org; Sat, 12 Dec 2020 15:25:06 -0500 Received: from quimby.gnus.org ([95.216.78.240]:50858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koBRw-0001ah-NN for 24237@debbugs.gnu.org; Sat, 12 Dec 2020 15:25:05 -0500 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=wRrjsvDyGzIJaKooGaCMjH8GtwznnKf6gbKCFpeFXWY=; b=YaJ2EVeFe6/GH7yO1qyBYXoSWo 1auGNR8jpffNnB1qC85DZYK8GwkITYwHUI12+QsRH7j29S7bmEdqx2GQwkIyesS2TzrpRellHxZ+X sw3bngyHL2lgZU9AHt973sULDAFJ1v3+ytIFe1oLuh6RcuNaKYTg3T/je6DNk3EByQr0=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1koBRm-0002Ig-9f; Sat, 12 Dec 2020 21:24:56 +0100 From: Lars Ingebrigtsen To: Drew Adams Subject: Re: bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning References: <6c4f5089-43fa-4ca1-a656-1ec1684df960@default> X-Now-Playing: Kiko Dinucci's _Rastilho_: "Febre do Rato" Date: Sat, 12 Dec 2020 21:24:53 +0100 In-Reply-To: <6c4f5089-43fa-4ca1-a656-1ec1684df960@default> (Drew Adams's message of "Mon, 15 Aug 2016 11:06:31 -0700 (PDT)") Message-ID: <87v9d67ox6.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: > The doc for :filter says this about the FILTER-FN: > > Emacs can call this function at any time that it does redisplay or > operates on menu data structures, so you should write it so it can > safel [...] 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: 0.0 (/) X-Debbugs-Envelope-To: 24237 Cc: 24237@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 (-) Drew Adams writes: > The doc for :filter says this about the FILTER-FN: > > Emacs can call this function at any time that it does redisplay or > operates on menu data structures, so you should write it so it can > safely be called at any time. > > Is this true in general, or only when the extended menu item is put on a > menu? > > A common idiom is to make 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. > > I'm guessing that in such a case this doc paragraph does not apply. If > this guess is correct then please correct the paragraph, so that it says > something like "If an extended menu item that uses :filter is placed on > a menu then Emacs can call FILTER-FN when...". I think making the documentation more specific here serves no purpose. The statement as is should be true: You should always write these filter functions as if they are called at any time. > Also, is it really the case that FILTER-FN can be called anytime Emacs > does redisplay? Shouldn't the doc say only that it can be called > anytime Emacs "operates on menu data structures"? Does it get called by > redisplay other than when redisplay operates on menu data structures? > In the case mentioned above (binding to a keyboard key), would FILTER-FN > ever be called during redisplay? I'm guessing that it would not. I don't see why we should specify that at all. Closing. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 12 15:25:10 2020 Received: (at control) by debbugs.gnu.org; 12 Dec 2020 20:25:10 +0000 Received: from localhost ([127.0.0.1]:46797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koBS2-0001bg-FC for submit@debbugs.gnu.org; Sat, 12 Dec 2020 15:25:10 -0500 Received: from quimby.gnus.org ([95.216.78.240]:50874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koBS1-0001bB-Dr for control@debbugs.gnu.org; Sat, 12 Dec 2020 15:25:09 -0500 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=vZxLGLuRKrkUPiXF5g+HaLRjNYQjaeDliISHGsi6qwk=; b=oWxG/V3oIgs0jwFonysbFULhGQ 8I0eM0gOye7vs1Ea1Nrmb2IBGtcUhCroZ5bodwsrrq+AJLtR4NQmqM4IVfVdpgGgkqqF48Ef+eQbd MPF8dfxHVsquj6ZhU2v8YYO0jEazbaYbEBJOt0Zb6kUADT2b9HG7uRwftl7g9witQfdw=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1koBRt-0002In-FB for control@debbugs.gnu.org; Sat, 12 Dec 2020 21:25:03 +0100 Date: Sat, 12 Dec 2020 21:25:00 +0100 Message-Id: <87tusq7owz.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #24237 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 24237 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: 0.0 (/) 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 24237 quit From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 12 15:45:26 2020 Received: (at 24237) by debbugs.gnu.org; 12 Dec 2020 20:45:26 +0000 Received: from localhost ([127.0.0.1]:46846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koBle-0004Gq-FE for submit@debbugs.gnu.org; Sat, 12 Dec 2020 15:45:26 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:57224) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koBld-0004Gd-5J for 24237@debbugs.gnu.org; Sat, 12 Dec 2020 15:45:25 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BCKjJYd036118; Sat, 12 Dec 2020 20:45:19 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=fA530xD79HN+C0GdUYXg9MgIwFpmZR/p17KYnSTQrCo=; b=Nj0OoDapiO9WnyB6KSPe1gfFLiVedqxQI0jKtb+QONNKgeXDLDZIiJdy6oRtS4/FHi1T uDDOBHtFhbQNDkAAwn84dimIHWSIrvsaD0JmXXDNdha/AqeKN9FEAk/Bu+0Aq7F1r4KH MX3OWu1aFrP49SfD2uhz+1UNyTcmb7ImMeE9rlTOgMonFEnuF7G9WCLcF5n+k407lxti 3sgkLTSvGhAeaqDHMjBIJAahmOCnHgZ7sw8oYI2mnENgwJuejQMIEzwNo3V3MPqDM35g tDrjo1IEambP2fgktbp5eMe+I3u7DS2yrjIxVOoDaTBBmvNRtDtYb9vehGqkluyEpWco Hg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2130.oracle.com with ESMTP id 35ckcb1e4g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 12 Dec 2020 20:45:19 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BCKf09b165271; Sat, 12 Dec 2020 20:45:19 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 35ckw8uhr1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 12 Dec 2020 20:45:19 +0000 Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0BCKjIlf007290; Sat, 12 Dec 2020 20:45:18 GMT MIME-Version: 1.0 Message-ID: <70cc884d-4f32-4a2e-b3f5-181709f2ca29@default> Date: Sat, 12 Dec 2020 12:45:17 -0800 (PST) From: Drew Adams To: Lars Ingebrigtsen Subject: RE: bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning References: <6c4f5089-43fa-4ca1-a656-1ec1684df960@default> <87v9d67ox6.fsf@gnus.org> In-Reply-To: <87v9d67ox6.fsf@gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5071.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9833 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012120162 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9833 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 priorityscore=1501 mlxscore=0 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 clxscore=1011 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012120162 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 24237 Cc: 24237@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 (---) > > The doc for :filter says this about the FILTER-FN: > > > > Emacs can call this function at any time that it does redisplay or > > operates on menu data structures, so you should write it so it can > > safely be called at any time. > > > > Is this true in general, or only when the extended menu item is put on = a > > menu? > > > > A common idiom is to make 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. > > > > I'm guessing that in such a case this doc paragraph does not apply. If > > this guess is correct then please correct the paragraph, so that it say= s > > something like "If an extended menu item that uses :filter is placed on > > a menu then Emacs can call FILTER-FN when...". >=20 > I think making the documentation more specific here serves no purpose. > The statement as is should be true: You should always write these filter > functions as if they are called at any time. >=20 > > Also, is it really the case that FILTER-FN can be called anytime Emacs > > does redisplay? Shouldn't the doc say only that it can be called > > anytime Emacs "operates on menu data structures"? Does it get called b= y > > redisplay other than when redisplay operates on menu data structures? > > In the case mentioned above (binding to a keyboard key), would FILTER-F= N > > ever be called during redisplay? I'm guessing that it would not. >=20 > I don't see why we should specify that at all. The Elisp manual is not only for readers reading as end users. This information is needed by people writing Lisp code that uses extended menu items. And as the bug report points out, a very different use case does not involve use of a menu at all. Now perhaps Emacs should provide some alternative to using an extended menu item, specifically for this very different use case. But until and unless it does that, the behavior for this particular use case should be covered in the doc. In particular, if the caveat that is written does NOT apply for this use case, then that should be pointed out. IF the guess is correct that this caveat does NOT in fact apply to this use case then no, it is NOT the case that "You should always write these filter functions as if they are called at any time." If that guess is correct then what you say as the reason for not fixing this doc bug simply isn't relevant. This is not some obscure detail. It goes to the heart of the behavior and use of extended menu items. If you instead want to create a new Lisp construct to achieve such filtering for non-menu uses, great - that would take care of this lack in a different, equally (maybe even more) acceptable way. Just ignoring this isn't TRT. I, for one, would like to know what the case really is wrt the display engine problem when you use an extended menu item without a menu. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 13 10:07:40 2020 Received: (at 24237) by debbugs.gnu.org; 13 Dec 2020 15:07:40 +0000 Received: from localhost ([127.0.0.1]:49911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koSyJ-00060d-Nr for submit@debbugs.gnu.org; Sun, 13 Dec 2020 10:07:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koSyI-00060R-8c for 24237@debbugs.gnu.org; Sun, 13 Dec 2020 10:07:38 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36292) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koSyA-0005cE-Ob; Sun, 13 Dec 2020 10:07:32 -0500 Received: from [176.228.60.248] (port=2896 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1koSyA-0006tg-28; Sun, 13 Dec 2020 10:07:30 -0500 Date: Sun, 13 Dec 2020 17:07:18 +0200 Message-Id: <83blexeod5.fsf@gnu.org> From: Eli Zaretskii To: Drew Adams In-Reply-To: <70cc884d-4f32-4a2e-b3f5-181709f2ca29@default> (message from Drew Adams on Sat, 12 Dec 2020 12:45:17 -0800 (PST)) Subject: Re: bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning References: <6c4f5089-43fa-4ca1-a656-1ec1684df960@default> <87v9d67ox6.fsf@gnus.org> <70cc884d-4f32-4a2e-b3f5-181709f2ca29@default> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 24237 Cc: larsi@gnus.org, 24237@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 (---) > Date: Sat, 12 Dec 2020 12:45:17 -0800 (PST) > From: Drew Adams > Cc: 24237@debbugs.gnu.org > > IF the guess is correct that this caveat does NOT > in fact apply to this use case then no, it is > NOT the case that "You should always write these > filter functions as if they are called at any time." > If that guess is correct then what you say as the > reason for not fixing this doc bug simply isn't > relevant. I don't think I understand what "this case" is, but in general menu functions could be called whenever the display engine needs to recalculate the contents and the dimensions of the menu, and that could basically be every redisplay cycle, depending on circumstances. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 13 12:25:11 2020 Received: (at 24237) by debbugs.gnu.org; 13 Dec 2020 17:25:11 +0000 Received: from localhost ([127.0.0.1]:50017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koV7P-0001WL-Fq for submit@debbugs.gnu.org; Sun, 13 Dec 2020 12:25:11 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:56710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koV7N-0001W7-Qu for 24237@debbugs.gnu.org; Sun, 13 Dec 2020 12:25:10 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BDHP4DB014687; Sun, 13 Dec 2020 17:25:04 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=UWEacZBvjoU3u94MEyy+Sec4pdIk02CJkiKXK+uneS0=; b=cwbmDuSdl14n9DHekdRuJHxMSdiQLNPkt7QPgNnKZC+Ijy5kQ6RAuv9YZxvdXStrINNJ G10j8pRcL/KXR+wAjQyd+aAqo6v04S2JoUUy/sJJT4OXA/FeCPnkIGa3W1RYMGAYm7uw h7Q/AdM3bQe9MlIwCjR7uNFWn+tjyDxFGI34m6ADcRqHrIZtBIc1yt3PkroHx+37FfVM 9ojDbVxNB6sBxsxssbXNS7mF+B6D5lDwYTQzsLj9MQVUrIKoxUKGZAhYHDSayu6WXazt v2jbTBICRMIx06aJNaInqyq7Gpa4Bsp/jOzDvDrl3Jj12ZJiT0MNiT5Jcgx0Ea1NVZwk AQ== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2130.oracle.com with ESMTP id 35ckcb2rbr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 13 Dec 2020 17:25:04 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BDHP36p119314; Sun, 13 Dec 2020 17:25:03 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 35d7ejppvr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 13 Dec 2020 17:25:03 +0000 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 0BDHOrNF023583; Sun, 13 Dec 2020 17:24:53 GMT MIME-Version: 1.0 Message-ID: Date: Sun, 13 Dec 2020 09:24:52 -0800 (PST) From: Drew Adams To: Eli Zaretskii , Drew Adams Subject: RE: bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning References: <<6c4f5089-43fa-4ca1-a656-1ec1684df960@default>> <<87v9d67ox6.fsf@gnus.org>> <<70cc884d-4f32-4a2e-b3f5-181709f2ca29@default>> <<83blexeod5.fsf@gnu.org>> In-Reply-To: <<83blexeod5.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)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9834 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 bulkscore=0 suspectscore=0 adultscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012130137 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9834 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 priorityscore=1501 mlxscore=0 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012130137 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 24237 Cc: larsi@gnus.org, 24237@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 (---) > > IF the guess is correct that this caveat does NOT > > in fact apply to this use case then no, it is > > NOT the case that "You should always write these > > filter functions as if they are called at any time." > > If that guess is correct then what you say as the > > reason for not fixing this doc bug simply isn't > > relevant. >=20 > I don't think I understand what "this case" is,=20 As was said in the original bug report and has been repeated in the thread, this case is the "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." > but in general menu functions Define "menu function", please. Does this apply to the case being discussed: an extended menu item that's bound only to a keyboard key, i.e., that's not used in any menu? > could be called whenever the display engine needs to > recalculate the contents and the dimensions of the menu, and that > could basically be every redisplay cycle, depending on circumstances. See above. There's no menu involved in the case being discussed (at least none that's visible to users, AFAIK). So there should be no need or possibility of recalculating menu contents and dimensions. This is (only) about the hack/idiom of using an extended menu item for a keyboard key binding (only). And the use case for doing that is to take advantage of the :filter handling. I don't know where/when the :filter handling is done. Perhaps it is done as an integral part of redisplay. If that's the case, does it mean that the warning in the doc is applicable in this case? If it is thus applicable in this case, does it need to be? IOW, could handling of :filter be separated out, at least in the case where no menu is involved? Again, though, I'm not really arguing that using a `menu-item' just to get :filter behavior for a keyboard key binding is the best approach. The point is that currently it is the _only_ approach, hence the idiom. If Emacs provides a more direct way to do this, that's uncoupled from `menu-item' and its redisplay handling, great. Lacking that, this bug is about having the doc address the use case of the idiom. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 13 12:57:03 2020 Received: (at 24237) by debbugs.gnu.org; 13 Dec 2020 17:57:03 +0000 Received: from localhost ([127.0.0.1]:50052 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koVcF-0002PR-BH for submit@debbugs.gnu.org; Sun, 13 Dec 2020 12:57:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koVcD-0002Ow-Gq for 24237@debbugs.gnu.org; Sun, 13 Dec 2020 12:57:02 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38873) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koVc7-0005cF-I8; Sun, 13 Dec 2020 12:56:55 -0500 Received: from [176.228.60.248] (port=2087 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1koVc6-0007VU-9t; Sun, 13 Dec 2020 12:56:55 -0500 Date: Sun, 13 Dec 2020 19:56:42 +0200 Message-Id: <83v9d5d1yd.fsf@gnu.org> From: Eli Zaretskii To: Drew Adams In-Reply-To: (message from Drew Adams on Sun, 13 Dec 2020 09:24:52 -0800 (PST)) Subject: Re: bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning References: <<6c4f5089-43fa-4ca1-a656-1ec1684df960@default>> <<87v9d67ox6.fsf@gnus.org>> <<70cc884d-4f32-4a2e-b3f5-181709f2ca29@default>> <<83blexeod5.fsf@gnu.org>> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 24237 Cc: larsi@gnus.org, 24237@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 (---) > Date: Sun, 13 Dec 2020 09:24:52 -0800 (PST) > From: Drew Adams > Cc: larsi@gnus.org, 24237@debbugs.gnu.org > > > I don't think I understand what "this case" is, > > As was said in the original bug report and has > been repeated in the thread, this case is the > > "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." That doesn't explain anything to me, sorry. > > but in general menu functions > > Define "menu function", please. Does this apply > to the case being discussed: an extended menu > item that's bound only to a keyboard key, i.e., > that's not used in any menu? I still don't understand what that means in practice. > > could be called whenever the display engine needs to > > recalculate the contents and the dimensions of the menu, and that > > could basically be every redisplay cycle, depending on circumstances. > > See above. There's no menu involved in the case > being discussed (at least none that's visible to > users, AFAIK). So there should be no need or > possibility of recalculating menu contents and > dimensions. Then you already know the answer and don't need any help, it seems. But if you do, please explain more about the specific use case you worry about. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 13 14:55:14 2020 Received: (at 24237) by debbugs.gnu.org; 13 Dec 2020 19:55:15 +0000 Received: from localhost ([127.0.0.1]:50341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koXSc-0001EK-Jx for submit@debbugs.gnu.org; Sun, 13 Dec 2020 14:55:14 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:34164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koXQW-00013j-I6 for 24237@debbugs.gnu.org; Sun, 13 Dec 2020 14:53:05 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BDJoSVM084160; Sun, 13 Dec 2020 19:52:57 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=SPhffe7EwEqjyZiv20un7/QIF42SmUJhw6jJId+8vcQ=; b=WJiJ5cyxinPqq7Cf6pFkXN8omzKcITz36B5m2+a/6XgW+YY11+nl+BEGk7Ya2VZxyKe4 VSLCEm8V2ai+tlwpqg5xjRIAXuyg5Q2zSOtuwiGDTudXkspc835Oshe+4hrhIGqgtyWM dRVdudlDlhmNvS2MYgg/VGKfTJg25Mo1j6HF6qifqoEq3KfM3yVZKU1HtLgJDOC0HUii mxqCiqZYk10qK8iqbXpEZVESpWR2QQLq4uasOuPrtqc1W4KY+4RzNN5P++EXQh38MTa0 kXZW6QpSXR1LcmMeGl/uZvzfZ9teFmYoK4G2/1wjR/hnr6lVLYpiDwR9f/WkufwLcmOD Xg== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 35ckcb2v7p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 13 Dec 2020 19:52:57 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BDJovAl174824; Sun, 13 Dec 2020 19:52:57 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 35d7mp4wr6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 13 Dec 2020 19:52:56 +0000 Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0BDJqsBB014526; Sun, 13 Dec 2020 19:52:55 GMT MIME-Version: 1.0 Message-ID: <846fcdf8-9b51-4246-8200-b067e7006e24@default> Date: Sun, 13 Dec 2020 11:52:53 -0800 (PST) From: Drew Adams To: Eli Zaretskii , Drew Adams Subject: RE: bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning 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>> In-Reply-To: <<83v9d5d1yd.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)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9834 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012130156 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9834 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 priorityscore=1501 mlxscore=0 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012130156 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 24237 Cc: larsi@gnus.org, 24237@debbugs.gnu.org, Stefan Monnier 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 (---) > > "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." >=20 > That doesn't explain anything to me, sorry. Sorry. Does an example help? (global-set-key "\C-o"=20 '`(menu-item "" forward-char :filter (lambda (cmd) (if (integerp prefix-arg) nil cmd)))) Stefan (cc'd), in particular, mentions this case from time to time. Here are some examples from him: In emacs-devel thread "Proposed patch for lookup-key" (2017-12-14): "bindings which are made dynamically conditional using a :filter function" In help-gnu-emacs thread "How to define minor-mode keybindings conditional on buffer's major-mode?" (2013-10-04): (define-key minor-mode-map "<>" `(menu-item "" minor-mode-command :filter ,(lambda (cmd) (if (eq major-mode 'xyz-mode) cmd)))) (define-key minor-mode-map "<>" `(menu-item "" minor-mode-command :filter ,(lambda (cmd) (if (not (eq major-mode 'xyz-mode)) cmd)))) In help-gnu-emacs thread "Commands with more than one keybinding in menus" (2013-08-14): You can use dynamic key-bindings, i.e. instead of binding your key to (lambda () (interactive) (if foo (CMD))), bind it to (menu-item "" CMD :filter (lambda (cmd) (if foo cmd))). In help-gnu-emacs thread "Shor-circuiting keybindings" (2010-12-09): You can create conditional key bindings: (define-key map [?\C-b] '(menu-item "dummy" :filter (lambda (binding) (if binding)))) =20 The filter function will receive as argument (this is so that the same filter function can be used for several bindings) and can opt to return it or not or to return anything else (so you can create dynamic bindings, which is typically used to construct dynamic menus, such as the Buffers menu). The you put as the "static binding" that gets passed to the filter is only used in cases such as where-is. In help-gnu-emacs thread "HELP: One Bindkey for Two Different Commands" (2007-11-30): How 'bout some neat hack like: (global-set-key "\M-o" '(menu-item "Foo" bar :filter (lambda (x) (if (cdr (window-list)) 'other-window 'switch-to-buffer)))) > > Define "menu function", please. ? (I don't think you answered that. If you still want to make a point about it, maybe let me know what you mean by it.) > > the case being discussed: an extended menu > > item that's bound only to a keyboard key, i.e., > > that's not used in any menu? >=20 > I still don't understand what that means in practice. Do the examples above help? It's about using the :filter mechanism designed for menu items with a keyboard key instead, to create a key binding that's "dynamic", i.e., conditional at the time you use the key. > > > could be called whenever the display engine needs to > > > recalculate the contents and the dimensions of the menu, and that > > > could basically be every redisplay cycle, depending on circumstances. > > > > See above. There's no menu involved in the case > > being discussed (at least none that's visible to > > users, AFAIK). So there should be no need or > > possibility of recalculating menu contents and > > dimensions. >=20 > Then you already know the answer and don't need any help, it seems. > But if you do, please explain more about the specific use case you > worry about. Please reread what I said. I'm not _aware_ of any actual menu being involved in the keyboard-key case. IF none is used, then I'm GUESSING that recalculating menu contents (what menu?) doesn't happen. But my point is only about having the doc address this specific use case - use of :filter when only a keyboard binding is used. IF that in fact doesn't involve any menus then shouldn't that paragraph be clarified to exclude that case in its caveat? From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 19 05:47:54 2020 Received: (at 24237) by debbugs.gnu.org; 19 Dec 2020 10:47:54 +0000 Received: from localhost ([127.0.0.1]:40881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqZmE-0001z7-KD for submit@debbugs.gnu.org; Sat, 19 Dec 2020 05:47:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqZmC-0001yu-O5 for 24237@debbugs.gnu.org; Sat, 19 Dec 2020 05:47:53 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54047) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqZm7-0004h2-3E; Sat, 19 Dec 2020 05:47:47 -0500 Received: from [176.228.60.248] (port=4586 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kqZm6-0004Zy-1c; Sat, 19 Dec 2020 05:47:46 -0500 Date: Sat, 19 Dec 2020 12:47:28 +0200 Message-Id: <83y2hut6m7.fsf@gnu.org> From: Eli Zaretskii To: Drew Adams In-Reply-To: <846fcdf8-9b51-4246-8200-b067e7006e24@default> (message from Drew Adams on Sun, 13 Dec 2020 11:52:53 -0800 (PST)) Subject: Re: bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning 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> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 24237 Cc: larsi@gnus.org, 24237@debbugs.gnu.org, monnier@iro.umontreal.ca 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 (---) > Date: Sun, 13 Dec 2020 11:52:53 -0800 (PST) > From: Drew Adams > Cc: larsi@gnus.org, 24237@debbugs.gnu.org, > Stefan Monnier > > > > > "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." > > > > That doesn't explain anything to me, sorry. > > Sorry. Does an example help? > > (global-set-key > "\C-o" > '`(menu-item > "" forward-char > :filter (lambda (cmd) > (if (integerp prefix-arg) nil cmd)))) 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 19 13:56:22 2020 Received: (at 24237) by debbugs.gnu.org; 19 Dec 2020 18:56:22 +0000 Received: from localhost ([127.0.0.1]:43158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqhOw-00022w-AT for submit@debbugs.gnu.org; Sat, 19 Dec 2020 13:56:22 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:40414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqhOt-00022h-4u for 24237@debbugs.gnu.org; Sat, 19 Dec 2020 13:56:20 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BJIpaxb019162; Sat, 19 Dec 2020 18:56:13 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=xEI2dYX5uz1LNjxC6iJs3f6EsvA3018t3GhqgB2L+b0=; b=q3N4/HJbdg96zGYi0lqO7qsXoNFSnW249Bsg3sQVrTxvilb7ltilhUUeJjgk3JYHXpMQ UwfO06/rJmQ0eeDTEQkYDZUjEMxLJEaNElYwjVrzLBgvnKRaB3nAkoEXMN5+eZneNFvr kPU2SaTHdSFaXuQsGqGxvWJZ1iQfpjiJZSNbzQVhljcUp65FybY30iGVWFPz2sAmbKDw 4IFKJhIjsaEKIaMzxD/OsZyJ1oNNBgNmbZ5XWRmT8XaQii1JMsxDaUaQXINfCJTnkaoS zJ7mHdz8+CKvXd3uqtaNUivCpdjyVHJNod2TYfZOAh/0xw4Up7U7i0lBxAKV5RA8q1lt GA== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 35h8xqs8t0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 19 Dec 2020 18:56:13 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BJIpOir140304; Sat, 19 Dec 2020 18:54:12 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 35h7j9eqme-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 19 Dec 2020 18:54:12 +0000 Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0BJIs7Ti004626; Sat, 19 Dec 2020 18:54:07 GMT MIME-Version: 1.0 Message-ID: Date: Sat, 19 Dec 2020 10:54:06 -0800 (PST) From: Drew Adams To: Eli Zaretskii , Drew Adams Subject: RE: bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning 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>> In-Reply-To: <<83y2hut6m7.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)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9839 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 adultscore=0 spamscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012190140 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9839 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 clxscore=1015 priorityscore=1501 mlxscore=0 lowpriorityscore=0 adultscore=0 mlxlogscore=999 suspectscore=0 phishscore=0 impostorscore=0 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012190140 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 24237 Cc: larsi@gnus.org, 24237@debbugs.gnu.org, monnier@iro.umontreal.ca 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 (---) > > > > "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." >=20 > 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. Extended menu items are not just for menus (in spite of the name). 2. What you've added here is what needs to be added there: a qualification to that caveat, that _when used in a menu_, "Emacs can call ... redisplay ... You should write it so it can safely be called at any time". 3. And because this use case is important and not at all obvious, the doc there should explicitly point out this use case. 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). b. If the only bindings for that extended menu item are keyboard bindings then the admonition about redisplay (see #2) does not apply. Don't assume that readers will understand that if not placed on a menu then it doesn't apply. The admonition is currently too blanket. Wrt #3: An example for this use case should be presented somewhere in the Elisp manual. If you can think of a better place than in the description of :filter, fine. If not, then that's the place. 4. As I said in the bug report, having to use an extended menu item for this feature is a hack or workaround. There's no other possibility out of the box. Better than just documenting that you can use an extended menu item with :filter to get this behavior would be to provide the behavior in another way. IOW, ideally it wouldn't be "hidden" under the misleading notion of a menu. :filter itself is not about menus. 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 19 14:18:00 2020 Received: (at 24237-done) by debbugs.gnu.org; 19 Dec 2020 19:18:00 +0000 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 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 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 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 Date: Sat, 19 Dec 2020 21:17:31 +0200 Message-Id: <838s9ttxkk.fsf@gnu.org> From: Eli Zaretskii To: Drew Adams In-Reply-To: (message from Drew Adams on Sat, 19 Dec 2020 10:54:06 -0800 (PST)) Subject: Re: bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning 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>> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 24237-done Cc: larsi@gnus.org, monnier@iro.umontreal.ca, 24237-done@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 (---) > 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 19 14:36:02 2020 Received: (at 24237-done) by debbugs.gnu.org; 19 Dec 2020 19:36:02 +0000 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 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 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== 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 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 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 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 MIME-Version: 1.0 Message-ID: <9db900ad-aec6-4000-8537-a43d781c458e@default> Date: Sat, 19 Dec 2020 11:35:45 -0800 (PST) From: Drew Adams To: Eli Zaretskii , Drew Adams Subject: RE: bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning 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>> 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)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 24237-done Cc: larsi@gnus.org, monnier@iro.umontreal.ca, 24237-done@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 (---) > > > > > > "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. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 19 19:05:41 2020 Received: (at 24237-done) by debbugs.gnu.org; 20 Dec 2020 00:05:41 +0000 Received: from localhost ([127.0.0.1]:43440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqmEH-0003Cx-I0 for submit@debbugs.gnu.org; Sat, 19 Dec 2020 19:05:41 -0500 Received: from mail-pj1-f46.google.com ([209.85.216.46]:34828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqmEC-0003Cg-0r for 24237-done@debbugs.gnu.org; Sat, 19 Dec 2020 19:05:39 -0500 Received: by mail-pj1-f46.google.com with SMTP id b5so3843250pjl.0 for <24237-done@debbugs.gnu.org>; Sat, 19 Dec 2020 16:05:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=nSpHdeGavEs+CXkq4tR4OH+pz4R+q4WZU1t7UTtQuEs=; b=n02bvZ0lLZvIAe1XhUB9RAadAunuwVfzYyzPeCS20bKYFRBz+uWbLyte5TWFiYJ3MR 3T1maw6e0eIH9HczQIgIyyAmpDAm9PHwfrVic8TMUTLBFu1kIV1x7N9cti2WR7/gcEoo rTZ8+G8oNb9UypvMJ/ZEhkIe+si1t8LttivIWKB+ha03ver11X0iFG66OSoDqIH28/VB xvIUihTuBUfG1eOZE2oe3tjYyyfgmln1/5WlcuCPzB2iCq3bLiWux1kcEyi9BZU2EUmK f2h3+qSC6jZQE7OTTJVUOHEddrpQBmokwsS9BvFJmkjM+KxG3F5JU5PBgUxV1fUJhQjf o4xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=nSpHdeGavEs+CXkq4tR4OH+pz4R+q4WZU1t7UTtQuEs=; b=aF0HJ/k6iAgkIrPfy5Mnv+SXN2mociChPcteU2XKKaDi+vo15PTuGAu+RKKBy8Xz+S P6JF7WGLnYOHAPqjDlVqsoUmej+82eRADhum9lZOUGh3nfjdreXcVIA1oEoUBVlloFNT XHaYNreaUxM6NZulZWHScoMz3/mANPNwSoZCANva2sW/odqLElVl4GwFHcCxRaPag4nG SMQTLlDm3e6HzJBEjACb2swTIyEaN2CHwsDpfP1mg49iLkRPF0RERR5B5r0qPaM7o4mz U9WU+pRUK0yKz7bRagRmJJxVJi76YCCNzZynlbP8o/VZtyQM3A2W+pW5oapiJYi74c65 5dXw== X-Gm-Message-State: AOAM531OvSYOuaRhH/xWtheCUzaw20W8wVs0otKuxdwzsgosF5LQV0gE n7CdPmJLvFLstkLNMu9N82ydX3VHTBFJHSSZN28= X-Google-Smtp-Source: ABdhPJw6fV8yftTZB215APFaMyDrzdoI/kzaK+3M3r8bSf6jBJ4P3I9mG4z5ZG62m5C9k+SDOIhKln5n5SyZNVPI/a0= X-Received: by 2002:a17:902:d351:b029:db:e003:3b88 with SMTP id l17-20020a170902d351b02900dbe0033b88mr10542254plk.70.1608422730235; Sat, 19 Dec 2020 16:05:30 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 19 Dec 2020 16:05:29 -0800 From: Stefan Kangas In-Reply-To: <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>> <9db900ad-aec6-4000-8537-a43d781c458e@default> MIME-Version: 1.0 Date: Sat, 19 Dec 2020 16:05:29 -0800 Message-ID: Subject: Re: bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning To: Drew Adams , Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24237-done Cc: larsi@gnus.org, monnier@iro.umontreal.ca, 24237-done@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 (-) Drew Adams writes: >> > 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. > > It is indeed a kludge/workaround/hack. I agree that this kludge shouldn't be documented. It is very strange to bind keys to menu-bindings just for :filter, and if we document it we in effect say that this is the preferred way of doing this stuff. > 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. It makes sense to me to file such a feature request. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 19 20:23:43 2020 Received: (at 24237-done) by debbugs.gnu.org; 20 Dec 2020 01:23:43 +0000 Received: from localhost ([127.0.0.1]:43507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqnRm-00050q-OZ for submit@debbugs.gnu.org; Sat, 19 Dec 2020 20:23:42 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:49352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqnRk-00050e-QR for 24237-done@debbugs.gnu.org; Sat, 19 Dec 2020 20:23:41 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BK1K3bQ075892; Sun, 20 Dec 2020 01:23:35 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=Nll8wzZY7DErTOjEznmWlrF2f5NhP7vXg/dYxvbY5tU=; b=LK31At+pMS471ucWmCUgJF+MHIZaR/ZjQiCrzYo8I4eMBqu1a8GFCBQGWrND7Ix7HtRW 55qMFSGwqvgSDm+hIP1Lm8ZEoEZ3Yj6Iw/RdIxUEQRx2fLivQqE3PHaDROBhq1jSqcO9 FfzU6nFArz9AL5F/3MMUrKM4WtHJ37Im7gCZzMSY6fmRPKHjXWKy/DXGX6U++r7wSIux UHbXwum63JcBMOqhaLfRi/HK9Ckk/SlpI2xm/0epEkJrEp0ut31bi3tO8OCeHLPfZp11 jFKkSxjLvhNn/f+8IouhQ6KO5OPTMvGD4jXKZM1LUWZ14/ueZQfL45A2xLvUDYGKNE4f 1g== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2130.oracle.com with ESMTP id 35h71asqwu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 20 Dec 2020 01:23:35 +0000 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 0BK1KMAA006445; Sun, 20 Dec 2020 01:23:34 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3030.oracle.com with ESMTP id 35huetsr0m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 20 Dec 2020 01:23:34 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0BK1NUYE031629; Sun, 20 Dec 2020 01:23:31 GMT MIME-Version: 1.0 Message-ID: <8bd82003-3c0f-4fa8-a39c-16e0df94b2a6@default> Date: Sat, 19 Dec 2020 17:23:30 -0800 (PST) From: Drew Adams To: Stefan Kangas , Eli Zaretskii Subject: RE: bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning 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>> <9db900ad-aec6-4000-8537-a43d781c458e@default> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5095.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9840 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012200008 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9840 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 bulkscore=0 clxscore=1015 suspectscore=0 spamscore=0 phishscore=0 malwarescore=0 mlxscore=0 impostorscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012200008 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 24237-done Cc: larsi@gnus.org, monnier@iro.umontreal.ca, 24237-done@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 (---) > I agree that this kludge shouldn't be documented. It is very strange to > bind keys to menu-bindings just for :filter,=20 It's not strange to do that for menu items. What's "strange", aka unexpected/new, is to do it for keyboard keys. > and if we document it we in effect say that this is > the preferred way of doing this stuff. Preferred way? No. It's the _only_ way (AFAIK). > > 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. >=20 > It makes sense to me to file such a feature request. Done: bug #45329. From unknown Fri Jun 20 20:10:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 17 Jan 2021 12:24:06 +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