4

After running (server-start) in Emacs, I evaluated

(daemonp)

and

(server-running-p)

The first one returns nil, whereas the second one returns t. So, how are a daemon and a server different in Emacs? The official website http://www.nongnu.org/emacsdoc-fr/manuel/emacs-server.html does not seem be distinguish the two.

Drew
  • 75,699
  • 9
  • 109
  • 225
zell
  • 173
  • 6

1 Answers1

3

There are two different and unrelated things, according to https://en.wikipedia.org/wiki/Daemon_(computing)

a daemon is a computer program that runs as a background process

according to (emacs) Emacs Server

Emacs as an “edit server”, so that it “listens” for external edit requests and acts accordingly.

you can start Emacs server without daemon or daemon without Emacs server, however, if you start daemon without Emacs server, the daemon is useless, e.g.,

$ emacs --daemon
$ emacsclient --eval '(server-mode -1)'

the daemon is still running, but you can't ask it to do anything.

xuchunyang
  • 14,302
  • 1
  • 18
  • 39