I installed emacs with homebrew and cask:

brew cask install emacs

It installed emacs 25.1.1.

I then linked the plist file to start emacs as a daemon on start up with:

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.emacs.plist

I added the following exports:

export EDITOR="emacsclient -t"terminal
export VISUAL="emacsclient -c -a emacs"

I have the following aliases:

alias em="emacsclient -t"
alias emax="emacsclient -c -a emacs"

The first one will open emacs in the terminal window and works fine but the second alias which I thought would open the GUI.

It does open the Gui but the terminal window is holding onto the process until I close the Guid down at which point it kills the emacs process and the daemon.

It displays the following text:

Waiting for Emacs...

How can I open the GUI in a new process and shut it down without killing the daemon?

1 Answer 1


Add -n to switches when invoking emacsclient. That's the thing you're looking for.

  • I mean the desktop app which I have the following alias for: ema='open -a /Applications/Emacs.app $1'. Is it possible to open this with emacs client?
    – dagda1
    Mar 26, 2017 at 7:13
  • Just point it to emacsclient and add -n to switches.
    – user12563
    Mar 26, 2017 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.