The Stack Overflow podcast is back! Listen to an interview with our new CEO.
13

I don't think the mouse really works when running in the terminal, so you cannot actually click. But to open the menus press F10 (or fn-F10 depending on your keyboard settings).


10

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 ...


7

The function display-graphic-p returns nil for non-GUI Emacs. So something like the following should work: (unless (display-graphic-p) (menu-bar-mode -1)) EDIT 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: (defun ...


6

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 ...


5

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, &...


5

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-...


3

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.


3

The dropdown menus in my installation of Emacs 24.3.1 are not working anymore. Upgrade to Emacs 24.4 for the dropdown menus feature.


3

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-...


3

Here is the solution: (define-key global-map (kbd "C-<f2>") (lambda () (interactive) (x-popup-menu (list '(0 0) (selected-frame)) (mouse-menu-bar-map)))) 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 ...


2

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.


2

Use easy-menu Quoting Emacswiki: EasyMenu (lisp/emacs-lisp/easymenu.el) is a package which allows you to write menu definitions which work under both, Emacs and XEmacs. Usage The code below can serve as an example to easymenu: (defvar menuitem1 ["Set mark!" (set-mark-command nil)]) ; Boring alias for C-SPC (defvar menuitem2 ["Show fireworks!" (...


2

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 ...


2

Found my answer here. Basically, executing list-faces-display gives me a list of all variable faces. The ones I was looking for begin with tty-menu-*


2

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: (eval-after-load "menu-bar" (lambda () (easy-menu-add-item nil '("Buffers") ITEM) ...)) where ITEM stands for the item you ...


2

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 && !end_time && !...


1

The value of the variable facemenu-menu is bound to C-<mouse2> and that value is a sparse keymap. Instead of binding #'menu-bar-open to <mouse-3> you can also bind the sparse keymap defining the menu bar to <mouse-3>: EDIT: As indicated by jue t is better to receive the menu bar keymap from mouse-menu-bar-map than to use the value of (...


1

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-...


1

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 Documentation: Nonzero means echo unfinished commands after this many seconds of pause. The value may be integer ...


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


1

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 ...


1

The problem went away after I have updated to GNU Emacs 25.1.1 (x86_64-w64-mingw32)


1

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 ...


1

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] (menu-bar-make-toggle toggle-case-fold-search case-fold-search "Ignore Case for Search" "Case-Insensitive Search %s" "Ignore letter-...


1

I have used this tool in the past and it works great emacs-fullscreen-win32 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 () "Toggles ...


1

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 ...


Only top voted, non community-wiki answers of a minimum length are eligible