SFINX documents - Emacs

GNU Emacs is a very useful and versatile editor, but unfortunately, these things cost memory and CPU power. Therefore, it is not recommended to start up a copy of GNU emacs for every little editing job. The overhead is just too big.

In case you prefer to start an editor every time there is some editing to do, we recommend you use MicroEmacs (mem), vi or vim. These editors are small and load quickly, and yet they provide all the features you need for simple editing (there are a couple of other editors which are not available on all systems, such as EDT, PICO and JOVE).

However, GNU emacs can be a very useful tool if you know how to use its features. One emacs process can edit many files, allowing you to switch between them. And one copy of GNU emacs takes less memory than three copies of MicroEmacs.

Now, this is all fine, but what if an editor is started automaticlly, e.g. from a mailer like elm ? Well, you can make such programs use the existing emacs, using a client-server protocol, implemented through the emacsclient command and the -f server-start command in Emacs.

To make the use of this system easier, Sfinx provides a command Emacs (note the capital E !!) which will show the appropriate behaviour in (almost) every case:

To start using Emacs, add the following lines to your .cshrc or .settings file:
  setenv EDITOR Emacs
  alias emacs Emacs
You might also have to edit your elm options (press o in elm, then e to change the editor). The editor should be set to $EDITOR.

NOTE: to tell emacs that you are finished with the client buffer, use C-x # (server-edit). Of course you can re-bind this function to a more convenient function key, e.g.

  (global-set-key [f7] 'server-edit)

NOTE: If you intend to use Emacs from elm, make sure to tell elm to store its temporary files in a directory that is shared by all machines. To do this, include in ~/.elm/elmrc something like:

tmpdir = $HOME/Mail/tmp/

See also then Emacs (l), emacs (1) and emacsclient (1) man-pages.


David.Jansen@strw.leidenuniv.nl
Last modified: Tue Jan 30 16:49:43 MET 1996