News for hackers. Stuff that matters.
Re:Emfy: Emacs for You – Quickly set up vanilla Emacs for ed... by eddieh on Wednesday December 29, 2021 @12:26PM (#29727088)
May I suggest

    (unless window-system (menu-bar-mode 0))
That way the menu is only disabled in the terminal. Beginners might find the menu useful when running a GUI on Windows or Linux—I certainly don't mind the menu on macOS as it is always there for Emacs.app (regardless of the value of menu-bar-mode).
Re:Emfy: Emacs for You – Quickly set up vanilla Emacs for ed... by daptaq on Wednesday December 29, 2021 @12:35PM (#29727195)
Note that `window-system' is deprecated in favor of `(display-graphic-p)'.
Re:Emfy: Emacs for You – Quickly set up vanilla Emacs for ed... by dasyatidprime on Wednesday December 29, 2021 @05:29PM (#29730933)
For the boolean case, yes.

But note also that an Emacs instance can open frames on multiple displays. This is not necessarily that hard to get if, for instance, you start with some X frames and then invoke emacsclient in a terminal in a way that causes it to open a character-cell frame there. window-system is documented as a terminal-local variable for this reason, and similarly the display-foo-p functions take an optional selector argument.

Which means that if you care about that, querying any of those once from your init file will not necessarily do what you want, and you should consider attaching to something like after-make-frame-functions. The global menu-bar-mode explicitly states that it applies to all current and future frames, too; toggle-menu-bar-mode-from-frame seems to be the per-frame version.

But if it's just cosmetic and you don't care about some variance in that case, then whatever. :-)

Re:Emfy: Emacs for You – Quickly set up vanilla Emacs for ed... by eddieh on Wednesday December 29, 2021 @12:57PM (#29727507)
I guess I didn't get the memo. I don't see what was wrong with `window-system' as it allowed stuff like `(eq window-system 'mac)' and `(memq window-system '(mac ns x))' which is nice if you're using different OSs/environments and need tailor your config.
Re:Emfy: Emacs for You – Quickly set up vanilla Emacs for ed... by profsnuggles on Wednesday December 29, 2021 @01:59PM (#29728497)
If you are trying to check what OS you are running wouldn't system-type be better? (eq system-type 'darwin) You could be running X on multiple different systems. Although I checked the output on netbsd and openbsd, both return berkeley-unix as the system-type... which isn't quite as helpful. At least I know if I'm on gnu/linux vs a BSD I guess. The docstring helpfully lets me know that a value of gnu means I'm running on Hurd. It also recognizes gnu/kfreebsd apparently because you can't throw a rock without hitting one of those.
Re:Emfy: Emacs for You – Quickly set up vanilla Emacs for ed... by eddieh on Wednesday December 29, 2021 @04:26PM (#29730226)
But I sometimes run X on Mac and I find it helpful to change a few things for Emacs compiled for X vs Emacs.app
Re:Emfy: Emacs for You – Quickly set up vanilla Emacs for ed... by natrys on Wednesday December 29, 2021 @01:19PM (#29727818)
Use of this variable as a boolean is deprecated. Not sure why, but what you are doing is perfectly fine.
Re:Emfy: Emacs for You – Quickly set up vanilla Emacs for ed... by aulin on Wednesday December 29, 2021 @01:22PM (#29727868)
I have `(menu-bar-mode 0)` in my init.el and I get no menubar on macos, emacs@plus installed with homebrew. Agree though that it's stays out of the way and I might re-enable it just for mac
Re:Emfy: Emacs for You – Quickly set up vanilla Emacs for ed... by eddieh on Wednesday December 29, 2021 @04:32PM (#29730296)
I’m running the Yamamoto Mitsuharu version of Emacs.app so maybe it is patched to ignore (menu-bar-mode 0).

I recall having my menu bar disappear on some other version of Emacs.app in the past, but I think it was from setting menu-bar-lines to 0 in the frame properties.