I have used emacsclient without any problem on OSX. Usually I just start Emacs server by emacs --daemon in Console, and then emacsclient works. I use emacsclient -nc to create a new frame. However, after upgrading to Emacs 24.4, emacsclient just hangs on without printing any info when invoking the command. I tried both http://emacsformacosx.com/ and brew install, and I had the same problem. Can anyone help to look at this issue? Thanks.

  • Have you already tried it without any user configuration files and/or additional libraries to see if it works out-of-the-box -- i.e. emacs -Q? Have you tried it from the directory where the new installation of emacs is located (or with the absolute path) to make sure you are calling the right version? OSX ships with an older version.
    – lawlist
    Commented Feb 3, 2015 at 7:13
  • I forgot emacs -Q... Yes the bare Emacs looks ok. Must be something messed up in my config files. Thank you.
    – Nolan
    Commented Feb 3, 2015 at 7:25
  • There appears to be a problem with Emacs under OS X, where Emacs hangs on startup about 10% of the times. Maybe you were just unlucky when you tried it. Commented Feb 3, 2015 at 7:48

1 Answer 1


May well be due to you're using the wrong emacsclient. I had the same (i.e.,
can't find socket and/or -error Unknown&_command:&_THEFILENAME Turned out I used /usr/bin/emacsclient, whereas my emacs is actually ~/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs . Creating a symlink from ~/Applications/Emacs.app/Contents/MacOS/bin/emacsclient to a place on my $PATH that precedes /usr/bin solved it. See http://www.citizen428.net/blog/2010/09/22/emacsclient-on-os-x/ BTW this is GNU Emacs 24.5.1 (x86_64-apple-darwin14.5.0, NS apple-appkit-1348.17), OSX Yosemite version 10.10.5

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.