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-...
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 ...
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.
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!" (...
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 ...
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-...
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
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 or floating point. If ...
Fonts and colors are assigned to faces, and faces are assigned to text in both the buffers and the UI. The text in the menu and menu popups uses the menu face, so if you run M-x customize-face RET menu RET you'll be able to change it to look how you want.
I don't believe there is a way to access the menu search feature from Emacs directly, but there is a workaround if you are using the Mitsuharu version of Mac Emacs: use M-x menu-bar-open, then type the standard key Cmd-? to open the menu search. You might try binding s-? to menu-bar-open so that you can get to the search by pressing it twice.
Every time you connect to emacs with emacsclient -t, it creates a new frame, hence the number keeps increasing. Those frames are destroyed when you disconnect with C-x #, so there's no way to get back to them.
If you want to change what's displayed in the mode-line, you can change mode-line-format to remove or replace mode-line-frame-identification.
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 (...
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 ...
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 ()
For the benefit of other people possibly still looking the matter up and landing here:
If your Emacs copy is built with Athena widgets (also known as Lucid) then you can use either command line arguments or X resources files.
In both cases you'd want to use emacs*menubar*font X resource and one of the fonts available to X windows system, as shown in the ...
This is Drew answer in details.
Configuring emacs menu is tricky but solvable. The problem is that emacs could be built with different visual libraries (like GTK, motif, lucid...) that affect on the menu apperanse different ways not related to emacs.
So what to do:
Understand which visual library your emacs is build with. Menu Help > About emacs.
In my ...