From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.bugs 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 Message-ID: <878v5f27pt.fsf@engster.org> References: <20130321193736.1518f8e2@ustudio-Satellite-C870-BJK> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1363938732 7757 80.91.229.3 (22 Mar 2013 07:52:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Mar 2013 07:52:12 +0000 (UTC) Cc: 14021@debbugs.gnu.org To: Nikita Zlobin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 22 08:52:38 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UIwmD-0002jm-Do for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Mar 2013 08:52:37 +0100 Original-Received: from localhost ([::1]:57138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIwlq-0003zj-4S for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Mar 2013 03:52:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIwll-0003yc-F7 for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2013 03:52:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIwlk-0002GU-BS for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2013 03:52:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIwlk-0002GF-1p for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2013 03:52:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UIwna-0006pC-Jn for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2013 03:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Engster Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Mar 2013 07:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14021 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14021-submit@debbugs.gnu.org id=B14021.136393879826172 (code B ref 14021); Fri, 22 Mar 2013 07:54:02 +0000 Original-Received: (at 14021) by debbugs.gnu.org; 22 Mar 2013 07:53:18 +0000 Original-Received: from localhost ([127.0.0.1]:39983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIwmo-0006o2-So for submit@debbugs.gnu.org; Fri, 22 Mar 2013 03:53:17 -0400 Original-Received: from randomsample.de ([83.169.19.17]:54744) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIwmi-0006no-F1 for 14021@debbugs.gnu.org; Fri, 22 Mar 2013 03:53:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=ZxB0ZAi0K2arFtztbhgcEoQEwV/8H8wBvIjpiasEDTA=; b=Aur3ZAiJIaPrNtEcFXIS31z0sIlpHC2FZMMQ0LWS2xZGpU9eRdY/QaqfZGDBGxmpAzJE9zm7We/PTWDLMz5ixR/+BpeZ+b8zWnia+v3wYKmVAJn/X7hcumYPKU+ytmQr; Original-Received: from dslc-082-083-045-077.pools.arcor-ip.net ([82.83.45.77] helo=spaten) by randomsample.de with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UIwkq-00023q-7F; Fri, 22 Mar 2013 08:51:12 +0100 In-Reply-To: <20130321193736.1518f8e2@ustudio-Satellite-C870-BJK> (Nikita Zlobin's message of "Thu, 21 Mar 2013 19:37:36 +0600") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3 (gnu/linux) Mail-Copies-To: never X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72785 Archived-At: 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