unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14021: Activation of both Semantic and EDE disables their common submenu in main emacs menu, leaving it available only in visible menu bar
@ 2013-03-21 13:37 Nikita Zlobin
  2013-03-22  7:51 ` David Engster
  0 siblings, 1 reply; 6+ messages in thread
From: Nikita Zlobin @ 2013-03-21 13:37 UTC (permalink / raw)
  To: 14021

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#14021: Activation of both Semantic and EDE disables their common submenu in main emacs menu, leaving it available only in visible menu bar
  2013-03-21 13:37 bug#14021: Activation of both Semantic and EDE disables their common submenu in main emacs menu, leaving it available only in visible menu bar Nikita Zlobin
@ 2013-03-22  7:51 ` David Engster
  2013-03-22 17:45   ` David Engster
  0 siblings, 1 reply; 6+ messages in thread
From: David Engster @ 2013-03-22  7:51 UTC (permalink / raw)
  To: Nikita Zlobin; +Cc: 14021

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





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#14021: Activation of both Semantic and EDE disables their common submenu in main emacs menu, leaving it available only in visible menu bar
  2013-03-22  7:51 ` David Engster
@ 2013-03-22 17:45   ` David Engster
  2014-02-10 21:24     ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: David Engster @ 2013-03-22 17:45 UTC (permalink / raw)
  To: Nikita Zlobin; +Cc: 14021

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





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#14021: Activation of both Semantic and EDE disables their common submenu in main emacs menu, leaving it available only in visible menu bar
  2013-03-22 17:45   ` David Engster
@ 2014-02-10 21:24     ` Glenn Morris
  2014-02-10 21:59       ` David Engster
  0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2014-02-10 21:24 UTC (permalink / raw)
  To: David Engster; +Cc: 14021

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?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#14021: Activation of both Semantic and EDE disables their common submenu in main emacs menu, leaving it available only in visible menu bar
  2014-02-10 21:24     ` Glenn Morris
@ 2014-02-10 21:59       ` David Engster
  2014-02-10 22:03         ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: David Engster @ 2014-02-10 21:59 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 14021

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





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#14021: Activation of both Semantic and EDE disables their common submenu in main emacs menu, leaving it available only in visible menu bar
  2014-02-10 21:59       ` David Engster
@ 2014-02-10 22:03         ` Glenn Morris
  0 siblings, 0 replies; 6+ messages in thread
From: Glenn Morris @ 2014-02-10 22:03 UTC (permalink / raw)
  To: 14021-done; +Cc: David Engster

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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-02-10 22:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-21 13:37 bug#14021: Activation of both Semantic and EDE disables their common submenu in main emacs menu, leaving it available only in visible menu bar Nikita Zlobin
2013-03-22  7:51 ` David Engster
2013-03-22 17:45   ` David Engster
2014-02-10 21:24     ` Glenn Morris
2014-02-10 21:59       ` David Engster
2014-02-10 22:03         ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).