Skip to content

Instantly share code, notes, and snippets.

@ChasManRors
Last active September 14, 2020 13:15
Show Gist options
  • Save ChasManRors/66416390047f982abfc73e1b0b0b5cf0 to your computer and use it in GitHub Desktop.
Save ChasManRors/66416390047f982abfc73e1b0b0b5cf0 to your computer and use it in GitHub Desktop.
Can not get emacsclient to work on macos. Tried everything I've seen. Please email me directly with respect to this request. Thank you.
# Running on
macOS 10.12.6 (16G1036)
# From iterm
$ emacsclient ~/.emacs.d/init.el
emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".
emacsclient: No socket or alternate editor. Please use:
--socket-name
--server-file (or environment variable EMACS_SERVER_FILE)
--alternate-editor (or environment variable ALTERNATE_EDITOR)
# from emacs shell
emacsclient ~/.emacs.d/init.el
emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".
emacsclient: No socket or alternate editor. Please use:
--socket-name
--server-file (or environment variable EMACS_SERVER_FILE)
--alternate-editor (or environment variable ALTERNATE_EDITOR)
# from emacs shell
.emacs.d$ emacsclient -ca "" init.el
emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".
Warning (server): Unable to start the Emacs server.
There is an existing Emacs server, named "server".
To start the server in this Emacs process, stop the existing
server or call ‘M-x server-force-delete’ to forcibly disconnect it.
Loading /Users/cmagid/.emacs.d/site-lisp/toggle-window-split.el (source)...
Loading /Users/cmagid/.emacs.d/site-lisp/toggle-window-split.el (source)...done
Starting Emacs daemon.
Unable to start the daemon.
Another instance of Emacs is running the server, either as daemon or interactively.
You can use emacsclient to connect to that Emacs process.
Saving file /Users/cmagid/.ido.last...
Wrote /Users/cmagid/.ido.last
Error: server did not start correctly
Error: Could not start the Emacs daemon
.emacs.d$ echo $EDITOR
/Users/cmagid/brew/bin/emacsclient
.emacs.d$ file /Users/cmagid/brew/bin/emacsclient
/Users/cmagid/brew/bin/emacsclient: Mach-O 64-bit executable x86_64
# From .emacs.d/init.el
(setq server-socket-dir (format "/tmp/emacs%d" (user-uid))) ; before server-start
(server-start)
$ emacsclient -v
emacsclient 25.3
(emacs-version nil)
"GNU Emacs 25.3.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911)) of 2017-09-12"
.emacs.d$ export EDITOR='/Applications/Emacs.app/Contents/MacOS/bin/emacsclient --no-wait --alternate-editor=/Applications/Emacs.app/Contents/MacOS/Emacs'
.emacs.d$ alias e=$EDITOR
.emacs.d$ e init.el
/Applications/Emacs.app/Contents/MacOS/bin/emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".
[email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment