GNU bug report logs - #14021
Activation of both Semantic and EDE disables their common submenu in main emacs menu, leaving it available only in visible menu bar

Previous Next

Package: emacs;

Reported by: Nikita Zlobin <nick87720z <at> gmail.com>

Date: Fri, 22 Mar 2013 00:37:03 UTC

Severity: normal

Merged with 14026

Fixed in version 24.4

Done: Glenn Morris <rgm <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 14021 in the body.
You can then email your comments to 14021 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#14021; Package emacs. (Fri, 22 Mar 2013 00:37:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nikita Zlobin <nick87720z <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 22 Mar 2013 00:37:03 GMT) Full text and rfc822 format available.

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

From: Nikita Zlobin <nick87720z <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Activation of both Semantic and EDE disables their common submenu
	in main emacs menu, leaving it available only in visible menu bar
Date: Thu, 21 Mar 2013 19:37:36 +0600
This bug happened for me in two places: in tmm menu, opened by command
tmm-menu (no matter, is menubar enabled or not), and its popup variant,
which may be opened by C-Mouse3 if menubar is disabled.

When only one of these two modes is enabled (either semantic or EDE),
menu is available, but after activation of remaining one submenu turns
to inactive usual menu item. But disabling of one mode, makes submenu
available again in both places.

Versions.
emacs - 23.4 (built menually, since in repo i had only 23.3), 24.2.1
and snapshot for debian from cassou personal package archive on
launchpad.
cedet - both builtin (own for each emacs version) and snapshot from bzr.

Already discussed this on cedet-devel mailing list, discussion is
under link below, where screenshots are available:
http://sourceforge.net/mailarchive/forum.php?thread_name=5148F5AC.6070502%40siege-engine.com&forum_name=cedet-devel

-------------------------------------------------------------------
Note, only first two posts are valuable for moment of this report. To
be brief in that discussion — i referred to popup menu, i'm talking
about, as "Global Menu" . Strange, how it may be wrong, when looking to
screenshots makes it fully clear.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14021; Package emacs. (Fri, 22 Mar 2013 07:54:02 GMT) Full text and rfc822 format available.

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

From: David Engster <deng <at> randomsample.de>
To: Nikita Zlobin <nick87720z <at> gmail.com>
Cc: 14021 <at> debbugs.gnu.org
Subject: Re: bug#14021: Activation of both Semantic and EDE disables their
	common submenu in main emacs menu,
	leaving it available only in visible menu bar
Date: Fri, 22 Mar 2013 08:51:10 +0100
Nikita Zlobin writes:
> This bug happened for me in two places: in tmm menu, opened by command
> tmm-menu (no matter, is menubar enabled or not), and its popup variant,
> which may be opened by C-Mouse3 if menubar is disabled.
>
> When only one of these two modes is enabled (either semantic or EDE),
> menu is available, but after activation of remaining one submenu turns
> to inactive usual menu item. But disabling of one mode, makes submenu
> available again in both places.

Since it took me quite some time to understand this, here's a recipe:

* emacs -Q

* M-x menu-bar-mode, so that menu-bar is disabled

* M-x semantic-mode

* M-x global-ede-mode

* Now do C-Mouse 3 to open the "global menu" popup (which I didn't know
  existed until yesterday...)

Look at the "Development" menu at the bottom. It might be disabled. If
not, try the recipe again - it seems to be a race condition.

If the item is disabled, turn on the menu-bar, and you'll see that the
Development menu there is working just fine.

The culprit is this: Both minor-modes, semantic and ede, should use the
"Development" menu, but you can use one or the other or both
together. This hack in semantic.el is used to accomplish this:

    (define-key map [menu-bar cedet-menu]
      (list 'menu-item "Development" cedet-menu-map
	    :enable (quote (not (bound-and-true-p global-ede-mode)))))

If you remove the :enable clause, the menu-bar displays two "CEDET-menu"
items underneath "Development", which is what this hack avoids. (Note
however that the "Global menu" popup will display correctly in this
case, so there's the first inconsistency between the two).

With this hack, the menu-bar works fine. It seems however that the
"Global Menu" popup displays *either* the item from Semantic *or* the
one from EDE, but only the latter is enabled. This is also where I guess
the race is happening.

I hope this information is sufficient to track this down. Otherwise I'll
try to come up with an isolated test case.

BTW, I managed to workaround this issue in CEDET trunk by using

	    :enable (quote (not (and menu-bar-mode
				     (bound-and-true-p global-ede-mode))))))

-David




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14021; Package emacs. (Fri, 22 Mar 2013 17:48:02 GMT) Full text and rfc822 format available.

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

From: David Engster <deng <at> randomsample.de>
To: Nikita Zlobin <nick87720z <at> gmail.com>
Cc: 14021 <at> debbugs.gnu.org
Subject: Re: bug#14021: Activation of both Semantic and EDE disables their
	common submenu in main emacs menu,
	leaving it available only in visible menu bar
Date: Fri, 22 Mar 2013 18:45:20 +0100
David Engster writes:
> Since it took me quite some time to understand this, here's a recipe:
>
> * emacs -Q
>
> * M-x menu-bar-mode, so that menu-bar is disabled
>
> * M-x semantic-mode
>
> * M-x global-ede-mode
>
> * Now do C-Mouse 3 to open the "global menu" popup (which I didn't know
>   existed until yesterday...)
>
> Look at the "Development" menu at the bottom. It might be disabled. If
> not, try the recipe again - it seems to be a race condition.

I was wrong here; there's no race condition, but it depends on the order
of mode activation. If you *first* enable global-ede-mode and then
semantic-mode, the Development menu will be disabled. So to be clear:
the above recipe is false; you have to do 'M-x global-ede-mode' first,
and then do 'M-x semantic-mode'.

> It seems however that the "Global Menu" popup displays *either* the
> item from Semantic *or* the one from EDE, but only the latter is
> enabled.

It actually seems that the menu entry that is displayed is the one which
was activated last.

As Nikita already wrote in his initial report, the text-mode menubar
(M-x tmm-menu) has the same problem, though I don't if it uses the same
code as the "Global Menu" popup.

-David




Forcibly Merged 14021 14026. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 30 Mar 2013 00:45:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14021; Package emacs. (Mon, 10 Feb 2014 21:25:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: David Engster <deng <at> randomsample.de>
Cc: 14021 <at> debbugs.gnu.org
Subject: Re: bug#14021: Activation of both Semantic and EDE disables their
 common submenu in main emacs menu,
 leaving it available only in visible menu bar
Date: Mon, 10 Feb 2014 16:24:28 -0500
David Engster wrote:

>> * emacs -Q
>>
>> * M-x menu-bar-mode, so that menu-bar is disabled
>>
>> * M-x semantic-mode
>>
>> * M-x global-ede-mode
>>
>> * Now do C-Mouse 3 to open the "global menu" popup (which I didn't know
>>   existed until yesterday...)
>>
>> Look at the "Development" menu at the bottom. It might be disabled. If
>> not, try the recipe again - it seems to be a race condition.
>
> I was wrong here; there's no race condition, but it depends on the order
> of mode activation. If you *first* enable global-ede-mode and then
> semantic-mode, the Development menu will be disabled. So to be clear:
> the above recipe is false; you have to do 'M-x global-ede-mode' first,
> and then do 'M-x semantic-mode'.

I could not seem to reproduce this. Was it fixed?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14021; Package emacs. (Mon, 10 Feb 2014 22:00:03 GMT) Full text and rfc822 format available.

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

From: David Engster <deng <at> randomsample.de>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 14021 <at> debbugs.gnu.org
Subject: Re: bug#14021: Activation of both Semantic and EDE disables their
 common submenu in main emacs menu,
 leaving it available only in visible menu bar
Date: Mon, 10 Feb 2014 22:59:47 +0100
Glenn Morris writes:
> David Engster wrote:
>
>>> * emacs -Q
>>>
>>> * M-x menu-bar-mode, so that menu-bar is disabled
>>>
>>> * M-x semantic-mode
>>>
>>> * M-x global-ede-mode
>>>
>>> * Now do C-Mouse 3 to open the "global menu" popup (which I didn't know
>>>   existed until yesterday...)
>>>
>>> Look at the "Development" menu at the bottom. It might be disabled. If
>>> not, try the recipe again - it seems to be a race condition.
>>
>> I was wrong here; there's no race condition, but it depends on the order
>> of mode activation. If you *first* enable global-ede-mode and then
>> semantic-mode, the Development menu will be disabled. So to be clear:
>> the above recipe is false; you have to do 'M-x global-ede-mode' first,
>> and then do 'M-x semantic-mode'.
>
> I could not seem to reproduce this. Was it fixed?

I managed to work around it with this patch, which is also in Emacs:

http://cedet.bzr.sourceforge.net/bzr/cedet/code/trunk/revision/8507

I think there is a bug in how the global menu is handling this, but I
guess that should be a separate bug report? IOW, I'd have no problem
with closing this.

-David




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Mon, 10 Feb 2014 22:04:02 GMT) Full text and rfc822 format available.

Notification sent to Nikita Zlobin <nick87720z <at> gmail.com>:
bug acknowledged by developer. (Mon, 10 Feb 2014 22:04:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: 14021-done <at> debbugs.gnu.org
Cc: David Engster <deng <at> randomsample.de>
Subject: Re: bug#14021: Activation of both Semantic and EDE disables their
 common submenu in main emacs menu,
 leaving it available only in visible menu bar
Date: Mon, 10 Feb 2014 17:03:04 -0500
Version: 24.4

David Engster wrote:

> I managed to work around it with this patch, which is also in Emacs:
>
> http://cedet.bzr.sourceforge.net/bzr/cedet/code/trunk/revision/8507

Hence closing this report.

> I think there is a bug in how the global menu is handling this, but I
> guess that should be a separate bug report?

Yes please, if someone can give a minimal test case that shows the
problem.




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Mon, 10 Feb 2014 22:04:03 GMT) Full text and rfc822 format available.

Notification sent to Nikita Zlobin <nick87720z <at> gmail.com>:
bug acknowledged by developer. (Mon, 10 Feb 2014 22:04:03 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. (Tue, 11 Mar 2014 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 104 days ago.

Previous Next


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