I run Emacs through the
emacs --daemon
command, which sets up a socket file /tmp/emacs100/server for emacsclient to communicate through. When I kill the server as:
emacsclient --eval "(kill-emacs)"
the socket file remains, preventing me from running emacs --daemon again. The same thing happens when I try M-x kill-emacs from inside Emacs.
Alternatively, when I try:
M-x server-force-delete
From within Emacs, I get a message saying:
No connection file "/tmp/emacs1000/server
Any ideas what is going wrong? How do I start and shut down the emacs server smoothly?
emacs -q --daemon? – Gilles Aug 16 '10 at 8:19emacs -q, I just noticed. I'll need to check my init files again. Thanks for the heads up! – Karthik Aug 20 '10 at 4:04(delete-file "/tmp/emacs1000/server"). D'oh. I just realized that I have setdelete-by-moving-to-trashto true, which means that it is trying and failing to put the server socket file in my trash bin, because it's not a regular file. If this is the same problem as you are having, I will post a solution shortly that will allow you to keep trash mode on but avoid this problem. – Ryan Thompson Feb 5 '11 at 20:30