From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning Date: Mon, 15 Aug 2016 11:06:31 -0700 (PDT) Message-ID: <6c4f5089-43fa-4ca1-a656-1ec1684df960@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1471284440 21734 195.159.176.226 (15 Aug 2016 18:07:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 15 Aug 2016 18:07:20 +0000 (UTC) To: 24237@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 15 20:07:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZMI8-0005Rh-4J for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Aug 2016 20:07:16 +0200 Original-Received: from localhost ([::1]:38351 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZMI5-0006cn-1o for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Aug 2016 14:07:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZMHz-0006cg-5D for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2016 14:07:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bZMHu-0000fz-4r for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2016 14:07:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60806) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZMHu-0000fv-1g for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2016 14:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bZMHt-0002TT-Ss for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2016 14:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Aug 2016 18:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24237 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14712844129490 (code B ref -1); Mon, 15 Aug 2016 18:07:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Aug 2016 18:06:52 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6753.5000 (x86)] 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:122248 Archived-At: 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'