I have (server-start)
in my .emacs file and set the variables HOME, ALTERNATE_EDITOR (=runemacs.exe) and EMACS_SERVER_FILE set.
When I start
emacsclientw.exe test.txt
the first time, I expect emacs to start and display the buffer test.txt
What happens is that emacs is started and the buffer scratch is displayed, the messsage line says (New file) and the buffer test.txt exists, but is not yet displayed.(That's not really what is bothering me right now)
When I now execute
emacsclientw.exe test2.txt
I expect that the same emacs is used and a new buffer test2.txt
is created.
But what happens is that a new emacs is started with an open warning buffer reading:
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 existingserver or call `M-x server-force-delete' to forcibly disconnect it.
This sounds to me as if the first instance starts a server, but the second does not connect to it but instead tries to start server again.
What could be the problem?