Columbia MM
MM Manual

WRITING A MESSAGE WITH EMACS

The recommended editor is Emacs, more precisely the GNU version of it, GNU Emacs. You can use Emacs from the UNIX shell prompt to create, edit and read files. You can also use it within MM, so that you can compose your text better. Emacs is especially useful for longer text.

This section does not teach you Emacs. There are paper handouts about Emacs and a full GNU Emacs Manual. There is an excellent online tutorial for Emacs. To see it, start at the UNIX shell prompt. Type Emacs to start Emacs, and when the Emacs screen appears, type control-h and the letter t.


USING EMACS IN MM

Start Emacs by typing control-e at the Message prompt. (You can also enter Emacs with the command edit at the S> prompt.)



MM>send
 To: fb2
 cc: mm33, hk12
 Subject: Meeting on Sept 21
 Message (End with CTRL/D or ESC
  Use CTRL/B to insert a file, CTRL/E to enter editor, CTRL/F to run text
  through a filter, CTRL/K to redisplay message, CTRL/L to clear screen and
  redisplay, CTRL/N to abort, CTRL/P to run a program and insert output.):
[control-e]




From: Joseph Brennan <jb51@cunixf.cc.columbia.edu>
To: fb2
Cc: mm33, hk12
Subject: Meeting on Sept 21
-----Emacs: *MM Headers*           (Text Fill)----All-------------------------
_















-----Emacs: *MM Outgoing*          (Text Fill)----All--------------------------
Don't forget to save your buffers if you want your changes to take effect


The Emacs screen for a send procedure has two windows. The upper smaller window shows the message header fields, and the larger window is for your message. The cursor is placed at the upper left corner of the message window (or at the end of the existing text, if you typed some text before typing control-e). Use the usual Emacs commands to compose the message.


LEAVING EMACS IN MM

Leave Emacs with either control-x control-z or control-x control-c. You will be asked whether to save the file .mm-outgoing.nn, and you should always answer y. The commands appear at the bottom of the screen:



-----Emacs: *MM Outgoing*          (Text Fill)----All--------------------------
C-x C-z




-----Emacs: *MM Outgoing*          (Text Fill)----All--------------------------
Save file /f/u1/d09200/jb51/.mm-outgoing.12345? (y or n)  y




-----Emacs: *MM Outgoing*          (Text Fill)----All--------------------------
S>


The file .mm-outgoing.nn (nn being MM's process id number) is a temporary file that MM destroys after reading it.

If you decide against sending the message, you should still exit as shown above, answering y to Save file..., but then type quit or q at the S> prompt. The reason this is the best way is that MM will wipe out the temporary file .mm-outgoing.nn for you. If you answer n to Save file..., Emacs keeps a copy of the file under the name #.mm-outgoing.nn#, and you will have to remove that yourself at some point.


USING EMACS FOR ALL MESSAGES

The variable use-editor-always is normally set to no. With that setting, you normally get MM's Text Mode to write your messages, and choose Emacs by typing control-e. If you would like to use Emacs all the time, type the command set use-editor-always yes, and then the command save-init. You will then always get Emacs to write messages, not Text Mode.


VARIABLES THAT CONTROL EMACS FOR MM

The variable control-e-editor determines whether control-e gets the editor. It is normally set to to yes. If it is reset to no, control-e does nothing.

The variable editor actually names Emacs as the editor to use. It is normally set to /usr/local/bin/emacs, the Emacs program. It could be set to name another editor on the system.

The variable gnuemacs-mmail should be set to yes if you use Emacs, and to no if you use any other editor. Set to yes, it handles putting the message text and headers into different Emacs buffers.

The variable mmail-path gives the location of the library of lisp commands that customizes a special MM mode for Emacs.


[ Columbia MM Manual ]