/Applications
- if you put itsomewhere else, you'll need to correct all the other scripts I'mmentioning in this post./Applications/Development
. (This subfolder keeps your Applicationsmenu clean, and has an important effect on sort order later.) To giveit a nice icon, select the original Emacs.app
; press ⌘I; click theicon in the top-left; press ⌘C; select on your new Emacs Server.app
bundle; press ⌘I; click the icon in the top-left; press ⌘V.+
button and choose Emacs Server.Emacs.app
./Applications/Development
.emacs
into Spotlight selects this as thefirst item ('Development' sorts before 'Emacs', 'Client' sorts before'Server').~/local/bin
. You'll need to add that to your $PATH
if you haven't already. First, two simple ones. These will start newinstances, not clients, but they're necessary to properly handle shellarguments for fallbacks for clients. They're also nice to have if youactually want to start a new instance.emacsc
:emacst
:ec
, start a Cocoaclient or fall back to a new instance (via the above emacsc
) if theserver is unavailable.et
, for a terminal client or new terminal instance.ec
and et
scripts instead of aliases? Many tools will failif $EDITOR
does not resolve to an actual executable somewhere in$PATH
because they invoke the tool directly instead of invoking ashell to run it.~/.bash_profile
, to override the ancientversion of Emacs that Mac OS X comes with by default.emacsc
or ec
from Terminal, Mac OS X doesn't realizeyou probably want to switch focus to the Emacs session automatically.There are also plenty of other ways you might start Emacs besidestyping a command into Terminal, and you probably want the new framesfocused then as well.ns
features in Emacs Lispand the frame-creation hooks. Add the following to your ~/.emacs
orsome file it loads:featurep
check means this is harmless to load onnon-OS X platforms, and ns-raise-emacs
is not (interactive)
forreasons that will be self-evident if you think about them.Emacs.app
rather than your custom Emacs Client.app
) behaves oddly when noframes are visible. Its menu bar and context menu don't work, and youcan't start a new frame from it directly. This is likely an issuebecause both Emacs and Finder assume any graphical application has atleast one main window / frame, even if it might not be visible.emacst
script, and Sean B. Palmer for Emacs Lisp improvements thatled to much simpler shell scripts.)