GNU bug report logs - #9899
24.0.90; change in menu item representation

Previous Next

Package: emacs;

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

Date: Fri, 28 Oct 2011 20:04:01 UTC

Severity: normal

Found in version 24.0.90

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

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 9899 in the body.
You can then email your comments to 9899 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 bug-gnu-emacs <at> gnu.org:
bug#9899; Package emacs. (Fri, 28 Oct 2011 20:04:02 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. (Fri, 28 Oct 2011 20:04:02 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.90; change in menu item representation
Date: Fri, 28 Oct 2011 13:01:07 -0700
Apparently, in Emacs 23, you changed the cached representation of menu
items.  Scanning the C code in keymap.c and keyboard.c suggests that the
caching of the key sequence is no longer done, and if already done
somewhere else is ignored (skipped over).
 
And yet, as late as Emacs 23.3, this remains in the doc (elisp) Extended
Menu Items:
 
"When an equivalent keyboard key binding is cached, the extended menu
item binding looks like this:
 
(menu-item ITEM-NAME REAL-BINDING (KEY-BINDING-DATA)
    . ITEM-PROPERTY-LIST)"
 
That text was removed for Emacs 24, but AFAICT it was already untrue for
Emacs 23 and should have been removed then.  There was no such caching
even in 23 AFAICT - no (KEY-BINDING-DATA).  That's what I see in the
debugger.
 
Obviously, this change breaks 3rd party/user code that takes advantage
of (KEY-BINDING-DATA).
 
The bug I'm reporting is to ask you to at least mention this change in
NEWS, or if possible in NEWS.23.  I also tried to find some mention of
this change in emacs-devel <at> gnu.org, but I couldn't find any mention, let
alone a proposal and discussion.  Admittedly, it was hard to search for
this, so I might have overlooked a thread about it.
 
This change is unfortunate, as it means that any code that wants to use
the already determined key representation must take the time needed to
look up the key afresh.  For menu-navigation code such as lacarte.el,
for instance, the key is included as part of the menu-item text
available for completion, and this change means taking extra time, for
each menu item, to look up a possible key binding.
 
Why do you keep moving stuff to C, instead of moving C stuff to Lisp?
Emacs should be as transparent and modifiable via Lisp as possible.
That's part of its being "the extensible editor".  You seem to be
working against that spirit, which is the heart of Emacs.  Why?
 
In GNU Emacs 24.0.90.1 (i386-mingw-nt5.1.2600) of 2011-10-24 on MARVIN
 Windowing system distributor `Microsoft Corp.', version 5.1.2600
 configured using `configure --with-gcc (4.6) --no-opt --cflags
 -I"D:/devel/emacs/libs/libXpm-3.5.8/include"
 -I"D:/devel/emacs/libs/libXpm-3.5.8/src"
 -I"D:/devel/emacs/libs/libpng-dev_1.4.3-1/include"
 -I"D:/devel/emacs/libs/zlib-dev_1.2.5-2/include"
 -I"D:/devel/emacs/libs/giflib-4.1.4-1/include"
 -I"D:/devel/emacs/libs/jpeg-6b-4/include"
 -I"D:/devel/emacs/libs/tiff-3.8.2-1/include"
 -I"D:/devel/emacs/libs/gnutls-2.10.1/include" --ldflags
 -L"D:/devel/emacs/libs/gnutls-2.10.1/lib"'
 





Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Fri, 28 Oct 2011 20:33:02 GMT) Full text and rfc822 format available.

Notification sent to "Drew Adams" <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Fri, 28 Oct 2011 20:33:02 GMT) Full text and rfc822 format available.

Message #10 received at 9899-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 9899-done <at> debbugs.gnu.org
Subject: Re: bug#9899: 24.0.90; change in menu item representation
Date: Fri, 28 Oct 2011 16:30:39 -0400
> This change is unfortunate, as it means that any code that wants to use
> the already determined key representation must take the time needed to
> look up the key afresh.

The menu code also needs to do that, so your need is clearly a need we
do satisfy: just use `where-is-internal' (if it's fast enough for the
menubar, it should be fast enough for your use).


        Stefan




Message #11 received at 9899-done <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Cc: 9899-done <at> debbugs.gnu.org
Subject: RE: bug#9899: 24.0.90; change in menu item representation
Date: Fri, 28 Oct 2011 14:17:54 -0700
> The menu code also needs to do that, so your need is clearly a need we
> do satisfy: just use `where-is-internal' (if it's fast enough for the
> menubar, it should be fast enough for your use).

Well, yes, that's obvious.  I wasn't asking how to get the key binding for the
command.

The bug is about not mentioning this change, e.g. in NEWS.

This behavior and data structure were well-documented for Emacs-Lisp users, from
day one.  You changed them silently.  It is the silently part that constitutes a
bug.  That's what we have NEWS for.

In a project with community spirit, such as was the case for Emacs in the past,
the change would even have been _proposed_ to the community for discussion
before carrying it out.  Regardless of the decision reached and who decides, you
can only gain by opening things up to discussion.  Poor Emacs.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9899; Package emacs. (Sat, 29 Oct 2011 00:47:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 9899 <at> debbugs.gnu.org
Subject: Re: bug#9899: 24.0.90; change in menu item representation
Date: Fri, 28 Oct 2011 20:44:56 -0400
> The bug is about not mentioning this change, e.g. in NEWS.

Ah, OK.  Done.


        Stefan




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

This bug report was last modified 13 years and 206 days ago.

Previous Next


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