The server-running-p
predicate will evaluate to t
if the Emacs server is running, irrespective of which Emacs session currently "owns" the server process.
Therefore, when there are two or more independent Emacs sessions running simultaneously, server-running-p
does not really test whether the current Emacs session is running the server.
I'm looking for a more specific test, one that will evaluate to t
if and only if the current session (i.e. the session performing the test) is running the Emacs server.
server-start
and afterserver-force-delete
),server-mode
was alwaysnil
.(server-mode 1)
rather than calling(server-start)
. The former invokes the latter, andserver-force-delete
also checks and disables this mode, so it rather looks likesever-mode
is the intended interface, and we shouldn't be callingserver-start
directly.server-mode
still doesn't account for the same server being started and deleted via multiple Emacs instances, as deleting the server from one instance has no effect on the value ofserver-mode
in another.