all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Engster <deng@randomsample.de>
To: Nikita Zlobin <nick87720z@gmail.com>
Cc: 14021@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <878v5f27pt.fsf@engster.org> (raw)
In-Reply-To: <20130321193736.1518f8e2@ustudio-Satellite-C870-BJK> (Nikita Zlobin's message of "Thu, 21 Mar 2013 19:37:36 +0600")

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





  reply	other threads:[~2013-03-22  7:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878v5f27pt.fsf@engster.org \
    --to=deng@randomsample.de \
    --cc=14021@debbugs.gnu.org \
    --cc=nick87720z@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.