How do I launch GUI Emacs from the command line in OSX?
I have downloaded and installed Emacs from http://emacsformacosx.com/.
I'll accept an answer fulfilling all of the following criteria:
If you are working with a graphical user interface, start Emacs by clicking its icon or by running emacs & at the command line. The & tells the command line to open Emacs in the background and immediately return control of the terminal to you.
The Control key is usually labeled 'Control' or 'CTRL' and is held down while typing the other keys of the command. To enter Emacs, type emacs at the shell prompt. When you want to leave Emacs for a short time, type a C-z and Emacs will be suspended. To get back into Emacs, type %emacs at the shell prompt.
Mostly simply, download and run the emacs- version -installer.exe which will install Emacs and create shortcuts for you. Alternately, download emacs- version .
Call the following script "emacs" and put it in your PATH
somewhere:
#!/bin/sh /Applications/Emacs.app/Contents/MacOS/Emacs "$@"
That covers #2, #3, and #4.
For #1, put this somewhere in your .emacs file:
(x-focus-frame nil)
The emacsformacosx.com site now has a How-To page, which is where the top snippet came from. There's more info there about running emacsclient
and hooking Emacs up to git mergetool
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With