From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#7695: 24.0.50; (elisp) Mouse Menus: incorrect and some missing info Date: Mon, 20 Dec 2010 17:15:50 -0800 Message-ID: <5898E2E5C7DE410CB683A358382E4D82@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1292894589 11136 80.91.229.12 (21 Dec 2010 01:23:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 21 Dec 2010 01:23:09 +0000 (UTC) To: 7695@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 21 02:23:05 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PUqwT-0003hl-A0 for geb-bug-gnu-emacs@m.gmane.org; Tue, 21 Dec 2010 02:23:05 +0100 Original-Received: from localhost ([127.0.0.1]:39764 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PUqwS-0004IE-L9 for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Dec 2010 20:23:04 -0500 Original-Received: from [140.186.70.92] (port=60969 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PUqwO-0004Hw-Fv for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2010 20:23:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PUqwN-0004GF-AQ for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2010 20:23:00 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56205) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PUqwN-0004G8-40 for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2010 20:22:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PUqjr-0005au-5p; Mon, 20 Dec 2010 20:10:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Dec 2010 01:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7695 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.129289377121458 (code B ref -1); Tue, 21 Dec 2010 01:10:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Dec 2010 01:09:31 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PUqjK-0005a3-Jj for submit@debbugs.gnu.org; Mon, 20 Dec 2010 20:09:30 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PUqjI-0005Zo-N0 for submit@debbugs.gnu.org; Mon, 20 Dec 2010 20:09:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PUqpZ-00037m-De for submit@debbugs.gnu.org; Mon, 20 Dec 2010 20:15:59 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:51445) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PUqpZ-00037h-B7 for submit@debbugs.gnu.org; Mon, 20 Dec 2010 20:15:57 -0500 Original-Received: from [140.186.70.92] (port=45812 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PUqpY-00025D-27 for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2010 20:15:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PUqpW-00037A-RH for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2010 20:15:55 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:17946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PUqpW-00036o-Kq for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2010 20:15:54 -0500 Original-Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oBL1FqLo000772 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 21 Dec 2010 01:15:53 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oBL1Fp6U018867 for ; Tue, 21 Dec 2010 01:15:51 GMT Original-Received: from abhmt005.oracle.com by acsmt353.oracle.com with ESMTP id 870250511292894144; Mon, 20 Dec 2010 17:15:44 -0800 Original-Received: from dradamslap1 (/10.159.239.22) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 20 Dec 2010 17:15:44 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcugrJq4XUl/cru5R86SvpodQWsFfw== 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 20 Dec 2010 20:10:03 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:42689 Archived-At: emacs -Q This is about `(elisp) Mouse Menus' and, in particular, its explanation about the use of `@' at the beginning of a menu item string. The doc is unclear (to me), seems to be missing some info, and is incorrect in at least one respect. Incorrect: "See the file `lisp/mouse.el' for an example of this." There is no use of any menu item with a name that starts with `@' in mouse.el. Unclear and perhaps missing some info: Eval this. (defun bar (event) (interactive "e") (x-popup-menu event `(keymap "Bar" (bar "@" ,@(mouse-menu-major-mode-map))))) (global-set-key [(control mouse-3)] nil) (global-set-key [(control down-mouse-3)] 'bar) Then `C-mouse-3' in an emacs-lisp-mode buffer. There is only one major mode menu, and what you see is a popup menu that has the same items as the major-mode menu. OK. Now use `C-mouse-3' in Dired. In Dired there are several major-mode menus. Instead of getting the items from the major-mode menus as items in the popup menu, you get each of the major-mode menus as a submenu. I don't see this behavior described anywhere. The explanation about `@' in this node sort of fits the case where there is a single major-mode menu. (But even then it is not clear.) But it does not at all seem to fit the case where there are multiple major-mode menus. Unless that is part of what this final paragraph is trying to say: "Multiple keymaps that define the same menu prefix key produce separate panes or separate submenus." I don't think so, but then again, I'm not sure what that paragraph _is_ trying to say. Certainly the test case I gave does not involve any prefix key (but it is about a mouse menu that uses `@'). Wrt `@' as a prefix for menu or menu-item name: We should document how you get a menu name to show a prefix of `@' - IOW, how to escape the special interpretation of `@'. (I tried escaping with one and multiple slashes, but that doesn't seem to work.) And if there is _no_ way to escape the special behavior (poor Emacs), then that should be stated explicitly. Also, I wonder if the submenus case is not more common now than the "panes" case. (Also, menu "panes" are referred to in several places in the manual, without, AFAICT, any description of what is actually meant by a menu "pane".) The behavior for the submenus case is less well described - not too clear, in fact. It seems thrown in as an afterthought. That might have been OK at one time, if the submenus case was uncommon. But isn't it common now? Also, most of what this Info node describes does not necessarily have anything to do with prefix keys. It describes mouse menu behavior and its relation to menu-item names (and `in particular @' as a name prefix). The discussion of using a prefix key should be clearly separated out, probably into a separate Info node. This node seems to mix up lots of different stuff, some of which has some relation in some contexts to some of the other stuff. But those relations are not all _necessary_ relations, and anyway they are not elucidated. At least that's my impression, but I admit that my understanding of what the node is trying to say is foggy. 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'