You can't hide the menu bar on OS X from within Emacs. It's always shown for non-fullscreen applications, that's simply how OS X works. Applications have no influence on that.
No menu bar
If you'd like to use Emacs without any menu bar, enable fullscreen mode with M-x toggle-frame-fullscreen.
Removing individual items
If you'd just like to remove ...
The function display-graphic-p returns nil for non-GUI Emacs. So something like the following should work:
My original answer only works for Emacs run only in a tty. Since you are using both GUI and TTY frames run from the same server, you need to modify individual frame parameters:
If you're intent on using the mouse, you can use a subset of mouse click functionality if your terminal is compatible with xterm. To do so, enable xterm-mouse-mode.
Source: manual page on "Using a Mouse in Text Terminals".
However, as @Ista's answer and @lawlist's comment suggest, you can use the keyboard to access the menu bar. That's probably a better ...
Menu bar items are represented as keybindings internally. So, this means that on the one hand keybinding-related actions will involve menu bar items and on the other one that clicking the "Search" item in the menu bar would yield a list where isearch-forward would be a valid action.
FWIW, the docs tell me something slightly different:
It is bound to C-s, &...
tool-bar-mode and menu-bar-mode being a global modes, you can enable them using a mode hook, but all buffers in all frames will be affected.
Never used it, but you may be interested by toolbar-here-mode
In addition to defining minor mode tool-bar-pop-up-mode, this
library defines minor mode tool-bar-here-mode, which is the
same as the global tool-bar-...
So-called easy-menu is one way. But it is not always easier than the "hard way", and the "hard way" is not hard. This is all you need to do:
Define a variable to hold your menu keymap, e.g., my-menu-bar-menu.
Bind a menu key in some keymap (e.g. global-map), which puts your menu on the menu-bar: (define-key global-map [menu-bar my-menu] (cons "Mine" my-...
You could disable the menu-bar completely with (menu-bar-mode -1) and use tmm-menubar whenever you want to access something in the menus. tmm-menubar is a text-only, key-binding driven menu-bar alternative which I like very much.
Here is the solution:
(define-key global-map (kbd "C-<f2>")
(x-popup-menu (list '(0 0) (selected-frame))
Also fixed in the source tree so that now f10 does the right thing.
This gives mouse-less access to the menu-bar functionality, not the OS menu interface, so the ...
If you are using the Options > Set Default Font... from the menu bar to set the default font, you also need to hit on Options > Save Options when you are happy with the settings you changed using the menu bar.
I want the ordinary behaviour from all other "normal" GUI editors
But you're not running it as a GUI editor, you're running in a terminal.
When menu-bar-mode is enabled (as it is for you), you can type <f10> to open the menus, and then navigate with the keyboard.
Or you can use the menus regardless by typing M-`
You may be able to get some mouse ...
Even if the automatic generation of the buffer menu is a bit complicated the method to add menu items to the buffer menu is quite simple.
Just add them with easy-menu-add-item after menu-mode is loaded. The general scheme is:
(easy-menu-add-item nil '("Buffers") ITEM)
where ITEM stands for the item you ...
This is not a real answer but it describes the current situation. (I hope I got it right.)
The following section of keyboard.c is relevant for the mouse event messages:
/* If in middle of key sequence and minibuffer not active,
start echoing if enough time elapses. */
if (minibuf_level == 0
f1 c (describe-key-briefly) works for mouse clicks and menu items too. So hit f1 c, click on the menu bar, and you'll see <menu-bar> <mouse-1> at that spot runs the command tmm-menubar-mouse. Whereas f1 c f10 says <f10> runs the command menu-bar-open. So to rebind:
(define-key global-map (kbd "<menu-bar> <mouse-1>") 'menu-...
You can set or bind variable echo-keystrokes to 0 (zero) to prevent, well, echoing keystrokes (which includes menu actions). C-h v echo-keystrokes says:
echo-keystrokes is a variable defined in C source code.
Its value is 1
Nonzero means echo unfinished commands after this many seconds of pause.
The value may be integer ...
I have a similar problem. This works for me.
In ~/.bashrc export the UBUNTU_MENU_PROXY variable
Source you .bashrc file
Open a terminal and launch emacs
This was a fast one. I struggled with this for quite a bit but a few minutes after posting the question, I found the answer myself.
I got a keyboard shortcut (Ctrl + ß) for opening Emacs in addition to the default shortcut Unity provides (Ctrl + 4 because it's the 4th application in my launcher). Every time I use Unity's shortcut, Emacs' menu bar integrates ...
Menu-bar is actually a pretty good memory aid for remembering important commands and its shortcuts. Its a pity that many modes come just with basic menus.
But you can add items to those mode menus. Here is how to do that. This answer fits pretty well to this question and expands the other answers already given.
Say you want to add Items to *scratch* buffers ...
EasyMenu (lisp/emacs-lisp/easymenu.el) is a package which allows you to write menu definitions which work under both, Emacs and XEmacs.
The code below can serve as an example to easymenu:
["Set mark!" (set-mark-command nil)]) ; Boring alias for C-SPC
["Show fireworks!" (...
See standard library menu-bar.el and C-h f menu-bar-make-toggle. Here are some examples from standard Emacs libraries.
For a checkbox (from menu-bar.el:
(define-key menu-bar-options-menu [case-fold-search]
"Ignore Case for Search"
"Case-Insensitive Search %s"
I have used this tool in the past and it works great
It is a executable and when run it looks for emacs and does some windows magic to make Emacs frames full screen. The readme has all the info you need to get it setup.
Just download the executable and add something like this to your config:
(defun toggle-full-screen ()
You have two problems in one question.
First, the error message on mouse event in your screenshots is likely to be caused by your configuration, you should try to isolate it by dichotomy (comment out half of your init file, see if the problem still appears, etc.)
Then the fact that emacs -Q does not provide mouse support. That seems to imply that mouse ...