0

I am using Emacs 25.3.2 on Linux Ubuntu 16.04.

The problem is that several of the menu bar items produce empty drop-downs. A grey box appears, but with nothing inside. It looks like this:

enter image description here

I originally noticed this happening for the YASnippet, Python and Virtual Envs and after playing around a lot with various modes, saving, closing, restarting Emacs and so on, I believe it is always specific to the current mode. The File, Edit, Options and Buffers tabs never seem to have a problem.

Pressing F10 seems to reset something and then everything works again, but after some time (I haven't been able to determine when/why exactly), the mode-relevant menu bar tabs seems to once again be empty.

Any clues as to what might be causing this?

I have seen this problem, but it appears to have been version specific and also a different issue to mine.

2
  • Does this also happen when you run Emacs without any user settings, so by running emacs -Q and manually loading YASnippet or any one of the other modes in which you've encountered this?
    – Arnot
    Commented Nov 10, 2017 at 9:28
  • No. I am unable to reproduce it by starting with emacs - Q and then loading in elpy or yasnippet. Although I haven't been able to pinpoint when it happens with my configuration. I'm stumped!
    – n1k31t4
    Commented Nov 10, 2017 at 9:47

2 Answers 2

1

I have a similar problem. This works for me.

ref: https://bugs.launchpad.net/ubuntu/+source/appmenu-gtk/+bug/673302

In ~/.bashrc export the UBUNTU_MENU_PROXY variable

export UBUNTU_MENU_PROXY=emacs

Source you .bashrc file

source ~/.bashrc

Open a terminal and launch emacs

2
  • this seems to work, but how can it be applied so that starting emacs from the launcher also picks up on the env var? I suppose setting all windows to have their dropdown settings on the frame, system-wide, should do it - even without exporting that env var.
    – n1k31t4
    Commented Jul 19, 2018 at 15:48
  • There's a transcription mistake or misunderstanding here - the command from the original was UBUNTU_MENU_PROXY= emacs - ie run the command emacs with the overridden environment variable set to the empty string
    – Greg
    Commented Dec 8, 2018 at 5:01
0

Robert Birkelbach, in "Dealing with empty menus in GNU Emacs", gave a simple fix that seems to work, namely add the following to your .emacs:

(menu-bar-mode -1)
(menu-bar-mode 1)

Why turning menus off and then back on would do the trick is not so clear... :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.