To use emacs as a server, look into gnuserv. From the manpage:
gnuclient allows the user to request a running emacs pro-
cess to edit the named files or directories and/or evalu-
ate lisp forms. Depending on your environment, it can be
an X frame or a TTY frame. One typical use for this is
with a dialup connection to a machine on which an emacs
process is currently running.
gnuserv is the server program that is set running by emacs
to handle all incoming and outgoing requests. It is not
usually invoked directly, but is started from emacs by
loading the gnuserv package and evaluating the Lisp form
(gnuserv-start).
Using gnuserv and gnuclient also addresses Aristotle's concern about the heavy startup costs of invoking emacs for each separate command.
|