Emacs server

From WikEmacs
Revision as of 12:55, 26 March 2012 by (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Emacs includes an optional client-server architecture.

To start the server, run server-start. If you want to use this feature it probably makes sense to do this somewhere in your configuration files.

Once this is done you may use the emacsclient command outside of Emacs to send a file to Emacs for editing, e.g. emacsclient ~/.emacs.d/init.el to modify your init file. On a GNU/Linux system it might be a good idea to set your EDITOR environment variable to emacsclient.

Once you have finished with a buffer that was opened via emacsclient you should use the C-x # (server-edit) to properly close the loop. Killing the buffer normally will not send the signal to emacsclient that Emacs has finished with the file.