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.