GNU bug report logs - #7695
24.0.50; (elisp) Mouse Menus: incorrect and some missing info

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Tue, 21 Dec 2010 01:10:02 UTC

Severity: minor

Found in version 24.0.50

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7695 in the body.
You can then email your comments to 7695 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7695; Package emacs. (Tue, 21 Dec 2010 01:10:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 21 Dec 2010 01:10:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.50; (elisp) Mouse Menus: incorrect and some missing info
Date: Mon, 20 Dec 2010 17:15:50 -0800
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'
 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#7695; Package emacs. (Sat, 10 Mar 2012 04:00:01 GMT) Full text and rfc822 format available.

Message #8 received at 7695 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 7695 <at> debbugs.gnu.org
Subject: Re: bug#7695: 24.0.50;
	(elisp) Mouse Menus: incorrect and some missing info
Date: Sat, 10 Mar 2012 11:29:22 +0800
"Drew Adams" <drew.adams <at> oracle.com> writes:

> Incorrect: "See the file `lisp/mouse.el' for an example of this."

Removed, thanks.

> 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.

Yes, this is a deliberate feature.  It probably shouldn't have been
introduced, but since it was, I've documented it.

I've made other improvements to the rest of the node.




bug closed, send any further explanations to 7695 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 10 Mar 2012 04:00:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 07 Apr 2012 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 44 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.