From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 29 12:19:15 2010 Received: (at submit) by debbugs.gnu.org; 29 Dec 2010 17:19:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PXzgA-0006v7-H7 for submit@debbugs.gnu.org; Wed, 29 Dec 2010 12:19:15 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PXzg9-0006uw-Ec for submit@debbugs.gnu.org; Wed, 29 Dec 2010 12:19:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PXzmo-0007rc-5g for submit@debbugs.gnu.org; Wed, 29 Dec 2010 12:26:07 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:49422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PXzmo-0007rW-1I for submit@debbugs.gnu.org; Wed, 29 Dec 2010 12:26:06 -0500 Received: from [140.186.70.92] (port=59336 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PXzmm-00086g-UH for bug-gnu-emacs@gnu.org; Wed, 29 Dec 2010 12:26:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PXzml-0007qp-MY for bug-gnu-emacs@gnu.org; Wed, 29 Dec 2010 12:26:04 -0500 Received: from rcsinet10.oracle.com ([148.87.113.121]:25755) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PXzml-0007qb-H6 for bug-gnu-emacs@gnu.org; Wed, 29 Dec 2010 12:26:03 -0500 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oBTHPwDn015708 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 Dec 2010 17:26:01 GMT Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oBTHPv9m028996 for ; Wed, 29 Dec 2010 17:25:58 GMT Received: from abhmt018.oracle.com by acsmt353.oracle.com with ESMTP id 914189591293643492; Wed, 29 Dec 2010 09:24:52 -0800 Received: from dradamslap1 (/10.159.216.195) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 29 Dec 2010 09:24:52 -0800 From: "Drew Adams" To: Subject: 24.0.50; Document that you can apply a keyword to a menu submenu Date: Wed, 29 Dec 2010 09:24:56 -0800 Message-ID: <58EA349B1CB44B7E96ED8B5A7B409201@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcunfU/Hm/vx3gfwTneieqV0+AxRfA== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) emacs -Q (See also related bug #6344.) The doc for so-called extended menu items is misleading and incomplete. 1. As bug #6344 addresses, the doc does not indicate that you can use `menu-item' and keywords for a non-selectable menu item. 2. The doc also does not indicate that you can use `menu-item' and keywords for a submenu, as opposed to a menu item. #2 is the subject of this bug report, but #1 and #2 should be addressed together. The relevant doc is (elisp) `Extended Menu Items'. What's missing is to explicitly state the following: a. This is about submenus as well as menu items (no, a submenu is not a menu item). This also means that the node name is not really appropriate. b. The form for a submenu is the same: (menu-item ITEM-NAME REAL-BINDING . ITEM-PROPERTY-LIST) But the REAL-BINDING description needs to be changed. This is incorrect: "The third element, REAL-BINDING, is the command to execute." REAL-BINDING can be a command or a keymap or nil. c. If REAL-BINDING is a command, then you get a selectable menu item. If it is a keymap then you get a submenu. If it is nil then you get a non-selectable menu item (e.g. a separator line). All of this is particularly important wrt ITEM-PROPERTY-LIST, which BTW needs to be renamed to something like KEYWORDS, since (i) it is a _keyword_ list, not an arbitrary property list, and (ii) it is not necessarily for a menu item, since REAL-BINDING can also be a keymap or nil. Without such doc changes, users will not know that they can use a keyword such as :visible with a submenu or a separator item (to remove it, in the case of :visible). I discovered this only by trial and error and by examining the Emacs source files. Among the Emacs source files, AFAICT only 3 files use :visible with a submenu, and for a total of only 5 submenus. The 3 files: menu-bar.el, semantic.el, and gdb-mi.el. The 5 submenus: `menu-bar-showhide-fringe-ind-menu', `menu-bar-showhide-fringe-menu', `menu-bar-showhide-scroll-bar-menu', `menu-bar-showhide-tool-bar-menu', `mule-menu-keymap', `edit-menu', `navigate-menu', `menu'. IOW, this feature does not appear to be used often by Emacs developers, which suggests that perhaps it is not well known. I got the idea when looking for a good way to dynamically remove a submenu that has only buffer-modifying commands from a popup menu whenever the buffer is read-only. I'm guessing that such a use case might be more common than the actual uses in our sources of :visible with a submenu indicate. Don't we have any submenus that should be removed or disabled for a read-only buffer, for example? In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2010-12-20 on 3249CTO Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.4) --no-opt --cflags -Ic:/imagesupport/include' From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 16:29:08 2019 Received: (at 7755) by debbugs.gnu.org; 11 Oct 2019 20:29:08 +0000 Received: from localhost ([127.0.0.1]:60435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJ1XA-00041N-9p for submit@debbugs.gnu.org; Fri, 11 Oct 2019 16:29:08 -0400 Received: from quimby.gnus.org ([80.91.231.51]:42018) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJ1X8-00041B-BQ for 7755@debbugs.gnu.org; Fri, 11 Oct 2019 16:29:06 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJ1X4-0002CV-9C; Fri, 11 Oct 2019 22:29:04 +0200 From: Lars Ingebrigtsen To: "Drew Adams" Subject: Re: bug#7755: 24.0.50; Document that you can apply a keyword to a menu submenu References: <58EA349B1CB44B7E96ED8B5A7B409201@us.oracle.com> Date: Fri, 11 Oct 2019 22:29:01 +0200 In-Reply-To: <58EA349B1CB44B7E96ED8B5A7B409201@us.oracle.com> (Drew Adams's message of "Wed, 29 Dec 2010 09:24:56 -0800") Message-ID: <87y2xrkovm.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.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: > b. The form for a submenu is the same: > (menu-item ITEM-NAME REAL-BINDING . ITEM-PROPERTY-LIST) > > But the REAL-BINDING description needs to be changed. This is > incorrect: > "The third element, [...] 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: 7755 Cc: 7755@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: > b. The form for a submenu is the same: > (menu-item ITEM-NAME REAL-BINDING . ITEM-PROPERTY-LIST) > > But the REAL-BINDING description needs to be changed. This is > incorrect: > "The third element, REAL-BINDING, is the command to execute." > > REAL-BINDING can be a command or a keymap or nil. > > c. If REAL-BINDING is a command, then you get a selectable menu item. > If it is a keymap then you get a submenu. If it is nil then you get > a non-selectable menu item (e.g. a separator line). I've now documented this in Emacs 27. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 16:29:12 2019 Received: (at control) by debbugs.gnu.org; 11 Oct 2019 20:29:13 +0000 Received: from localhost ([127.0.0.1]:60438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJ1XE-00041f-K9 for submit@debbugs.gnu.org; Fri, 11 Oct 2019 16:29:12 -0400 Received: from quimby.gnus.org ([80.91.231.51]:42034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJ1XD-00041Y-1i for control@debbugs.gnu.org; Fri, 11 Oct 2019 16:29:11 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJ1XA-0002Cc-7q for control@debbugs.gnu.org; Fri, 11 Oct 2019 22:29:10 +0200 Date: Fri, 11 Oct 2019 22:29:07 +0200 Message-Id: <87wodbkovg.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #7755 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: tags 7755 fixed close 7755 27.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: 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 (-) tags 7755 fixed close 7755 27.1 quit From unknown Fri Aug 15 16:18:53 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 09 Nov 2019 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