appmenu-gtk breaks dynamically created Emacs Gtk+ menus

Bug #673302 reported by Krzysztof Klimonda
310
This bug affects 64 people
Affects Status Importance Assigned to Milestone
DBus Menu
Triaged
Medium
Unassigned
appmenu-gtk (Ubuntu)
Fix Released
Low
Unassigned
Raring
Won't Fix
Undecided
Unassigned
libdbusmenu (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: appmenu-gtk

When appmenu-gtk is installed some menus in Emacs are empty. Uninstalling it fixes the issue.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: appmenu-gtk (not installed)
ProcVersionSignature: Ubuntu 2.6.35-23.36-generic 2.6.35.7
Uname: Linux 2.6.35-23-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Wed Nov 10 01:27:11 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha amd64 (20100913)
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.utf8
SourcePackage: appmenu-gtk

Related branches

Revision history for this message
Andy Eyre (science-andyeyre) wrote :

I confirm that maverick emacs23 (23.1+1-4ubuntu7) fails to show custom menus on a vanilla install, and that removal of appmenu-gtk (0.1.9-0ubuntu4) apparently fixes the bug.

Changed in appmenu-gtk (Ubuntu):
status: New → Confirmed
Revision history for this message
BobvanderPoel (bob-mellowood) wrote :

Yes ... but it causes many programs -- emacs, gedit, evince and more -- to print a number of gtk-warning message on the underlying terminal. Probably not the best fix, but, yes, it does appear to narrow down the problem.

Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

Yes, the other workaround is to emacs with UBUNTU_MENU_PROXY set to nothing (like $ UBUNTU_MENU_PROXY= emacs) but it's still a workaround and it has to be fixed somehow, somewhere.

Revision history for this message
BobvanderPoel (bob-mellowood) wrote :

Not sure exactly what you mean with UBUNTU_MENU_PROXY but I just tried with and without appmenu-gtk installed:

bob$ export UBUNTU_MENU_PROXY=
bob$ emacs

And it makes no difference. Without appmenu it prints warnings to the terminal, but buffer menu works. With appmenu, no warnings and improper updates.

I might be missing something ....

Revision history for this message
Luc Pi (oluc) wrote :

your export command is wrong, remove the "="

Revision history for this message
Grégoire (gregoire-zjyto) wrote :

I got the same problem. And to make the workaround work, I had to UBUNTU_MENUPROXY instead of UBUNTU_MENU_PROXY.

$ UBUNTU_MENUPROXY= emacs

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

indicator-appmenu crashes in Natty with Gnome Classic when Gnus tries to generate it's own menus in emacs.

Revision history for this message
Gavin Massingham (gavmassingham) wrote :

This Appmenu rubbish is becoming seriously annoying - it's not just Emacs it's all over the shop. It's getting really close to being a reson to ditch Ubuntu on my netbook.

Given the number of application for which Appmenu seems to be broken - just from the bug reports there are Emacs, Audacity, Rhythmbox, Empathy, etc. etc. shouldn't there be some kind of 'meta-bug' that looks at addressing these issues globally - letting users take applications out of appmenu control on a case by case basis, or whatever, until this piece of software is fixed?

Revision history for this message
Michael Terry (mterry) wrote :

Can someone give clear examples of missing menus (like which ones are missing or reproduction steps)? I suspect this is a dup of either bug 696896 or bug 709281, both of which deal with missing dynamic menus.

Revision history for this message
Darlan Cavalcante (darcamo) wrote :

A remember a few of the menus that were empty, such as the yasnippets menu (when you have yasnippets installed, but sometimes the menu appears), the python menu when editing a python file, the org and tbl menus when editing a .org file, etc., All of them work correctly when appmenu-gtk is not installed.

I just installed the appmenu-gtk package again to see if anything changed and the bug is still there (emacs 23.2.1). The menus that are always present no matter which major mode is used (File, Edit, Options, Buffers, Tools and Help menus) work fine. The menus specific to the different major-modes and loaded libraries are the problem.

To reproduce the bug, open emacs with the command "emacs -Q". Emacs starts in the scratch buffer (with all the mentioned menus as well as the "Lisp Interaction" menu, since the scratch buffer is in the lisp interaction major mode. They all seems to work fine. Change the major-mode somehow and the new menus will be empty. In fact, the first menu will have the contents of the lisp interaction menu which was there before and all the other menus will be empty (except the menus that are always there).

On the other hand, I made the same tests with the development version of Emacs (24.0.50.4) and I can't reproduce the bug on it anymore. I'm sure that I could reproduce the bug on Emacs 24.0.50.4 before, therefore the Emacs devs must have solved this on their side.

Revision history for this message
Sebastien Bacher (seb128) wrote :

one bug component is enough

Changed in appmenu-gtk (Ubuntu):
importance: Undecided → Low
status: Confirmed → Invalid
Revision history for this message
Sebastien Bacher (seb128) wrote :

could you try if that's still an issue in natty? recent updates fixed several bugs about missing menu entries

Changed in indicator-appmenu (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Darlan Cavalcante (darcamo) wrote :

I installed Ubuntu 11.04 (alpha 2) in virtualbox and noticed that Ubuntu now uses global menu. Anyway, no matter which major mode I'm in Emacs the dynamic menus are not shown, so the bug (or a new one) is still there. Only the menus that are always available (File, Edit, Options, Buffers, Tools and Help) are shown.

I only tested with the emacs installed from the repository 23.2.1 so the development version of emacs might work in natty as well. However, the version shipped with Ubuntu should work.

Revision history for this message
Robert Vaccaro (cobra-reverser) wrote :

sudo emacs & also gives me back my missing dynamic menus, but it's not convenient.

Revision history for this message
Miguel Rodríguez (migrax) wrote :

The bug is still valid in natty.

Some dynamically generated menus, like those added by auctex when editing LaTeX files fail to appear.

Changed in indicator-appmenu (Ubuntu):
status: Incomplete → New
Revision history for this message
Ted Gould (ted) wrote :

Okay, I need someone to provide a "dummies guide to recreating this bug." I've tried to see it and it seems like menus are appearing and disappearing, perhaps correctly. Simple steps please. No "M-x" just "hit Ctrl-Q" or something. With a vanilla install of Emacs or a packaged extension please.

affects: indicator-appmenu (Ubuntu) → libdbusmenu (Ubuntu)
Changed in libdbusmenu (Ubuntu):
importance: Low → Medium
status: New → Triaged
affects: indicator-appmenu → dbusmenu
Changed in dbusmenu:
assignee: nobody → Ted Gould (ted)
importance: Undecided → Medium
status: New → Triaged
tags: added: parser
Revision history for this message
Miguel Rodríguez (migrax) wrote :

Ok. I don't have access to a natty box right now, but this is what I've done to reproduce the problem:

a) Launch the alpha-3 natty live-cd inside Virtualbox (with plenty of RAM)
b) Open a terminal and install both emacs and auctex (sudo apt-get install emacs auctex)
c) Launch emacs and open a new Latex file.

Expected results:
Three new menus should show: Preview, Latex and Command

Results:
None of the three new menus appeared.

Extra info:
If I remove the menubar from the panel and repeat the procedure, the three menus appear inside the emacs window menubar, but they are empty (they should not). Maybe this is the root of the bug.

Hope this helps.

Revision history for this message
Michael Terry (mterry) wrote :

An example latex file: http://www.ee.iitb.ac.in/~trivedi/LatexHelp/Docs/Report/abstract.tex

If you open emacs with the file already loaded (i.e. via the command line), the extra menus appear. If you load the file once emacs is already up, they don't.

Ted, I can work on this, but given the amount of time left before natty, maybe blacklist emacs in appmenu-gtk as a fallback?

Revision history for this message
Michael Terry (mterry) wrote :

I've uploaded a new appmenu-gtk that blacklists emacs.

Revision history for this message
strav (strav) wrote :

Just updated from the new appmenu-gtk (if the one I saw passing through apt-get really was it) but I'm not certain if blacklisting was sufficient. The menus are shown, indeed, but that also are empty (where obviously they shouldn't). (might I add, starting emacs as a super user works but it's not a good idea).

Revision history for this message
Michael Terry (mterry) wrote :

Works for me as a normal or super user...

Revision history for this message
strav (strav) wrote :

Michael,

I've just checked the diff for your patch and you only list "emacs" in the black list. I still had the problem because my emacs is launched as emacs23 (and most of the time as emacsclient -c -a emacs23 actually). Perhaps a regex could be good at this point.

Anyways, thanks for the fix

Revision history for this message
gblive (gblive) wrote :

Michael,

if emacs is started from a terminal the menu stays attached to emacs window and all latex items are there. However, if it is started from the unity dash (i.e. by pressing Super, typing emacs and hitting enter), the resulting window will have a global menu with latex things missing.

11.04 beta2
appmenu-gtk 0.2.1-0ubuntu2

Thanks

Revision history for this message
Harry Skelton (skelton-harry) wrote :

The missing menus affect many programs. The terminal program, games, and even Firefox. This is a major problem. Unity may want to have a unified menu system, but thus far all my clients have demanded that I go back to the "Classic" Ubuntu view.

I used terminal and right clicked the window and it showed a menu with "show menu" checked - yet no menu. Toggling this does not change anything. Games such as Gweled and others also lack top menus.

Hope you guys can fix this soon.

Revision history for this message
wilk (j-cubizolles) wrote :

I have a history with this bug :
* I experienced it with emacs23 from the standard Ubuntu repository but it disappeared at some point.
* I experienced it agains with emacs-snapshot from http://emacs.naquadah.org/natty/ and fixed it by chance. Just running emacs-snapshot through sudo once was needed. Now the menus appear even when I run it without sudo.

Revision history for this message
dlebauer (dlebauer) wrote :

I have this bug on emacs-snapshot but not emacs23. Ubuntu 11.04.

The menu works when emacs-snapshot is run as root, but running as root (as indicated in comment # 25) does not lead to a fix.

Revision history for this message
Charles Kerr (charlesk) wrote :

Since the latest update on this ticket was 11.04, I have to ask -- can anyone confirm this behavior in 12.04?

Revision history for this message
Darlan Cavalcante (darcamo) wrote : Re: [Bug 673302] Re: appmenu-gtk breaks dynamically created Emacs Gtk+ menus

I'm using Ubuntu 12.04 and the bug seems to be fixed. I tested both, emacs
23 from the repositories, as well as emacs 24 compiled from sources (using
gtk3, but probably works with gtk2 too), and I didn't perceive any problem
in any of them.

2012/4/3 Charles Kerr <email address hidden>

> Since the latest update on this ticket was 11.04, I have to ask -- can
> anyone confirm this behavior in 12.04?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/673302
>
> Title:
> appmenu-gtk breaks dynamically created Emacs Gtk+ menus
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dbusmenu/+bug/673302/+subscriptions
>

Revision history for this message
Darlan Cavalcante (darcamo) wrote :

I'm using Ubuntu 12.04 and the bug seems to be fixed. I tested both, emacs 23 from the repositories, as well as emacs 24 compiled from sources (using gtk3, but probably works with gtk2 too), and I didn't perceive any problem in any of them.

Revision history for this message
Pieter Swinkels (swinkels) wrote :

Well, it is not fixed for my installation of Ubuntu 12.04 - an upgrade from 11.10 - and for the emacs-snapshot from ppa:cassou/emacs. The global menu only shows the standard Emacs menu, regardless of Emacs mode or functionality that should change the menu.

The emacs-snapshot package contains an 'emacs-snapshot' binary and an 'emacs' binary. The 'emacs-snapshot' binary uses the global menu (which remains fixed), the 'emacs' binary uses its own menu which is dynamic.

Revision history for this message
Brett Presnell (bdp) wrote :

I can verify Pieter's comments. I too am on Ubuntu 12.04 with Cassou's emacs-snapshot, all completely up to date. There are no other versions of emacs installed.

1. If I start "emacs-snapshot-gtk" from Unity, the global Unity menu for emacs is static, and there is no menu bar on the emacs window.

2. If I run "emacs-snapshot-gtk" from an xterm, the behaviour is the same as in 1.

3. If I run just "emacs" from an xterm, then the global Unity menu is still broken, but the emacs window has it's own menu and in that menu the dynamic stuff is working, i.e., the available menus change with the mode of the buffer.

Revision history for this message
Brett Presnell (bdp) wrote :

Ok, so my #3 is just because "emacs" is blacklisted for appmenu-gtk while "emacs-snapshot-gtk" is not. Still, this is an unsatisfactory solution for an emacs user who is actually trying to adapt to unity. Is anyone currently working on properly integrating emacs into the Unity menu scheme?

Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

I confirm Pieter's and Brett's observations.

Revision history for this message
Emilio Gallego (egallego-babel) wrote :

Quantal also has this problem with emacs-snapshot. Blacklisting emacs-snapshot in src/briged to fix this problem.

Revision history for this message
Simon Hirscher (codethief) wrote :

For me it behaves slightly differently than for Pieter (I'm using Damien Cassou's snapshots as well):

If I start emacs24 the menu gets displayed as global app menu. In contrast to that, there's no global app menu (but instead a "local" one in the window) when running emacs, emacsclient or emacsclient.emacs24. Further comparing both menus shows that in case of emacs24, the global app menu does indeed dynamically adapt to the major mode (i.e. a menu is added for org, html, c++ etc.), however this new mode menu doesn't nearly show all the options that are available in the local app menu in emacs / emacsclient / emacsclient.emacs24.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.6 KiB)

This bug was fixed in the package appmenu-gtk - 12.10.3daily12.11.28-0ubuntu1

---------------
appmenu-gtk (12.10.3daily12.11.28-0ubuntu1) raring; urgency=low

  [ Mathieu Trudel-Lapierre ]
  * debian/control:
    - Update to use trailing commas at the end of dependency lists.
    - Reorganize Build-Depends for clarity.
    - Drop Build-Depends on cdbs and bump debhelper to (>= 9).
    - Update Vcs-Bzr, Vcs-Browser and add notice to uploaders.
    - Add a Build-Depends on gnome-common.
  * debian/compat: bump compat level to 9.
  * debian/rules:
    - Migrate from cdbs to dh9 sequencer.
    - Add and export DPKG_GENSYMBOLS_CHECK_LEVEL.
    - Override dh_autoreconf to call autogen.sh and not run configure.

  [ Didier Roche ]
  * Automatic snapshot from revision 162 (bootstrap)

  [ Sebastien Bacher ]
  * Pidgin menu items for accounts are not updated on the menubar when
    disabling them (LP: #598494)
  * Dynamic menu is empty (Epiphany) (LP: #601943)
  * doesn't display icons (LP: #598528)
  * Please blacklist "IBM Notes" (LP: #1077095)
  * Weird sub-menu associated with Anjuta's File -> Quit entry (LP:
    #599817)
  * [Master] Application is showing a partial menu (LP: #594228)
  * Tabs menu in gnome-terminal does not display correctly (LP: #592848)
  * [Master] Menu items are out of order. (LP: #594230)
  * g_object_add_weak_pointer: assertion `G_IS_OBJECT (object)' failed
    (LP: #1026160)
  * Gimp: menu item missing (LP: #598623)
  * Firefox supposedly crashing with appmenu-gtk (LP: #600880)
  * Missing "Network Button" for wifi inputs (LP: #788640)

  [ Michael Terry ]
  * appmenu-gtk breaks dynamically created Emacs Gtk+ menus (LP:
    #673302)
  * Regression - Menubar appears/disappears when launching an app (LP:
    #971459)

  [ Ted Gould ]
  * the xsession script should set the variable only if the needed file
    is installed (LP: #674047)
  * (various) crashed with SIGSEGV in
    g_atomic_int_exchange_and_add()/g_variant_unref/?libappmenu.so/g_sim
    ple_async_result_complete (LP: #703988)
  * Shotwell - menubar not updated when switching back to a category
    (LP: #729203)
  * appmenu-gtk leaks references (LP: #830260)
  * crashes with SIGSEGV in do_rebuild() when running under valgrind
    (LP: #726388)
  * Some apps don't integrate to appmenu after having their windows
    closed (LP: #718926)
  * appmenu-gtk 0.1.96-0ubuntu1 prevents desktop global menu (desktop
    appmenu in unity panel) from appearing (LP: #733050)
  * gnome-display-properties crashed with SIGSEGV in g_object_set() (LP:
    #729065)

  [ Charles Kerr ]
  * Regression - Menubar appears/disappears when launching an app (LP:
    #971459)
  * Call GTK functions without gdk lock (LP: #797188)

  [ Ken VanDine ]
  * Duplicate separator items in app menus (LP: #594867)
  * Add support for keyboard shortcuts in menus (LP: #591293)
  * Fall back to stock menu if the applet isn't in the panel (LP:
    #607285)
  * Shotwell - menubar not updated when switching back to a category
    (LP: #729203)
  * crashes with SIGSEGV in do_rebuild() when running under valgrind
    (LP: #726388)
  * gnome-display-properties crashed with SIGSEGV in g_object_set() (LP:
    #72...

Read more...

Changed in appmenu-gtk (Ubuntu):
status: Invalid → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in appmenu-gtk (Ubuntu Raring):
status: New → Confirmed
Revision history for this message
neutrico (neutrico) wrote :

This is not FIX this is a workaround!

How could you close this bug and pretend it's done?

Ted Gould (ted)
Changed in libdbusmenu:
assignee: Ted Gould (ted) → nobody
Revision history for this message
Rolf Leggewie (r0lf) wrote :

raring has seen the end of its life and is no longer receiving any updates. Marking the raring task for this ticket as "Won't Fix".

Changed in appmenu-gtk (Ubuntu Raring):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.