I have a line (server-start)
in my .emacs
for some reasons. Everything is fine when I launch a first session of Emacs, but when I open anther session, there is a buffer which shows:
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.
As I quite often open several Emacs, I am wondering if it is possible modify `.emacs' file so as to avoid this message in the beginning.
Could anyone help? Thank you very much!
In emacs check the value of server-socket-dir . Check if there are some files in this directory. If does, then the server is running.
Try:
(require 'server) (or (server-running-p) (server-start))
Note that server-running-p
does not appear in the manual, so conceivably this could break with future versions of Emacs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With