spacemacs

happyb3at 2022-04-03T04:50:09.512439Z

Howto make spacemacs show menu-bar on startup? Adding (menu-bar-mode t) to user-config gets ignored?

Martynas Maciulevičius 2022-04-03T07:28:39.193709Z

I have never used menu bar and didn't even know what it was for spacemacs. Instead I press Alt+x and search for a command.

practicalli-johnny 2022-04-03T11:30:00.820479Z

(menu-bar-mode 1) should be added to the dotspacemacs/user-config section of .spacemacs configuration file to enable the Emacs menu on startup. Or press F10 key to enable the Emacs menu when Emacs is running. Be aware the Emacs menu is quite limited compared to the which-key menu via SPC , which provides a menonic guide to the large number of commands available for Emacs.

happyb3at 2022-04-03T13:54:00.608549Z

Yeah i tried (menu-bar-mode 1) to in dotspacemacs/user-config does still doesnt work. If i do M-x (menu-bar-mode) it does show. Just cant make it show permanently???

happyb3at 2022-04-03T14:01:56.543379Z

the menu bar does show briefly at startup but is then removed again

practicalli-johnny 2022-04-03T14:17:18.482589Z

I assume something is disabling the Emacs menu after user-config is loaded, which is unusual as user-config is the last thing to load. I assume there must be a hook somewhere in the Spacemacs code that disables the Emacs menu. Suggest searching the Spacemacs code for menu-bar-mode I can take a quick look tomorrow if you can't find anything, but I really don't think it's worth doing

happyb3at 2022-04-03T14:19:42.306719Z

in core-early-funcs.el

happyb3at 2022-04-03T14:19:46.944449Z

(defun spacemacs/removes-gui-elements () "Remove the menu bar, tool bar and scroll bars." ;; removes the GUI elements (when (and (fboundp 'scroll-bar-mode) (not (eq scroll-bar-mode -1))) (scroll-bar-mode -1)) (when (and (fboundp 'tool-bar-mode) (not (eq tool-bar-mode -1))) (tool-bar-mode -1)) (unless (memq (window-system) '(mac ns)) (when (and (fboundp 'menu-bar-mode) (not (eq menu-bar-mode -1))) (menu-bar-mode -1))) ;; tooltips in echo-aera (when (and (fboundp 'tooltip-mode) (not (eq tooltip-mode -1))) (tooltip-mode -1)))

happyb3at 2022-04-03T14:21:06.281399Z

just cant see why i cant undo that using a simple (menu-bar-mode 1) in user-config since that one is supposed to be run as the last thing.

happyb3at 2022-04-03T14:24:36.613499Z

It gets called from core-spamacs.el (defun spacemacs/init () "Perform startup initialization." (setq command-line-args (spacemacs//parse-command-line command-line-args)) (when spacemacs-debugp (spacemacs/init-debug)) ;; silence ad-handle-definition about advised functions getting redefined (setq ad-redefinition-action 'accept) ;; this is for a smoother UX at startup (i.e. less graphical glitches) (hidden-mode-line-mode) (spacemacs/removes-gui-elements)

happyb3at 2022-04-03T14:27:20.285179Z

but even if i uncomment that line and save the file still no mojo. Do i need to do more than uncomment the line in core-spacemacs.el and then save the file and then restart emacs? Could there be a byte compiled version of the .el file I need to compile in order to pickup the uncomment of that line?

happyb3at 2022-04-03T14:30:24.071299Z

core-spacemacs.el dont contain the "shebang of no byte compile line" i.e. ;; -*-no-byte-compile: t; -*-

happyb3at 2022-04-03T14:31:36.098239Z

so really shouldnt be a compiled vs non compiled issue. but I am new elisp so maybe something I dont see 🙂

practicalli-johnny 2022-04-03T17:48:57.186919Z

I don't know anyone who has used the Emacs menus with any community configuration. It's usually the first thing turned off. They are not something I would find valuable. I suggest creating your own Emacs configuration would be much more effective than changing design approach taken by Spacemacs and other configurations.