Go to the first, previous, next, last section, table of contents.

How do I use an already running Emacs from another window?

The `emacsclient' program is for editing a file using an already running Emacs rather than starting up a new Emacs. It does this by sending a request to the already running Emacs, which must be expecting the request.

NOTE: `emacsclient' and `server' must be running on machines which share the same filesystem for this to work. The pathnames that emacsclient specifies should be correct for the filesystem that the Emacs process sees. The Emacs process should not be suspended at the time emacsclient is invoked. emacsclient should either be invoked from another X window or from a shell window inside Emacs itself.

There is an enhanced version of emacsclient/server called `gnuserv' by Andy Norman <ange@hplb.hpl.hp.com> which is available in the Emacs Lisp Archive. gnuserv uses Internet domain sockets, so it can work across most network connections. It also supports the execution of arbitrary Emacs Lisp forms and also does not require the client program to wait for completion. It is available via anonymous FTP (Emacs Lisp Archive: packages/gnuserv.shar).


Go to the first, previous, next, last section, table of contents.