1

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 ALTERNATE_EDITOR=""
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?

2

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 '17 at 7:13
  • Just point it to emacsclient and add -n to switches. – DoMiNeLa10 Mar 26 '17 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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