(emacs)Mail Mode


Next: Distracting NSA Prev: Mail Aliases Up: Sending Mail

Mail Mode
=========

   The major mode used in the `*mail*' buffer is Mail mode, which is
much like Text mode except that various special commands are provided on
the `C-c' prefix.  These commands all have to do specifically with
editing or sending the message.

`C-c C-s'
     Send the message, and leave the `*mail*' buffer selected
     (`mail-send').

`C-c C-c'
     Send the message, and select some other buffer
     (`mail-send-and-exit').

`C-c C-f C-t'
     Move to the `To' header field, creating one if there is none
     (`mail-to').

`C-c C-f C-s'
     Move to the `Subject' header field, creating one if there is none
     (`mail-subject').

`C-c C-f C-c'
     Move to the `CC' header field, creating one if there is none
     (`mail-cc').

`C-c C-w'
     Insert the file `~/.signature' at the end of the message text
     (`mail-signature').

`C-c C-y'
     Yank the selected message from Rmail (`mail-yank-original').  This
     command does nothing unless your command to start sending a
     message was issued with Rmail.

`C-c C-q'
     Fill all paragraphs of yanked old messages, each individually
     (`mail-fill-yanked-message').

   There are two ways to send the message.  `C-c C-s' (`mail-send')
sends the message and marks the `*mail*' buffer unmodified, but leaves
that buffer selected so that you can modify the message (perhaps with
new recipients) and send it again.  `C-c C-c' (`mail-send-and-exit')
sends and then deletes the window or switches to another buffer.  It
puts the `*mail*' buffer at the lowest priority for reselection by
default, since you are finished with using it.  This is the usual way
to send the message.

   Mail mode provides some other special commands that are useful for
editing the headers and text of the message before you send it.  There
are three commands defined to move point to particular header fields,
all based on the prefix `C-c C-f' (`C-f' is for "field").  They are
`C-c C-f C-t' (`mail-to') to move to the `To' field, `C-c C-f C-s'
(`mail-subject') for the `Subject' field, and `C-c C-f C-c' (`mail-cc')
for the `CC' field.  These fields have special motion commands because
they are the most common fields for the user to want to edit.

   `C-c C-w' (`mail-signature') adds a standard piece text at the end
of the message to say more about who you are.  The text comes from the
file `.signature' in your home directory.

   To insert signatures automatically, set the variable
`mail-signature' non-`nil'; then starting a mail message automatically
inserts the contents of your `.signature' file.  If you want to omit
your signature from a particular message, delete it from the buffer
before you send the message.

   When mail sending is invoked from the Rmail mail reader using an
Rmail command, `C-c C-y' can be used inside the `*mail*' buffer to
insert the text of the message you are replying to.  Normally it
indents each line of that message four spaces and eliminates most
header fields.  A numeric argument specifies the number of spaces to
indent.  An argument of just `C-u' says not to indent at all and not to
eliminate anything.  `C-c C-y' always uses the current message from the
`RMAIL' buffer, so you can insert several old messages by selecting one
in `RMAIL', switching to `*mail*' and yanking it, then switching back to
`RMAIL' to select another.

   You can specify the text for `C-c C-y' to insert at the beginning of
each line: set `mail-yank-prefix' to the desired string.  (A value of
`nil' means to use indentation; this is the default.) However, `C-u C-c
C-y' never adds anything at the beginning of the inserted lines,
regardless of the value of `mail-yank-prefix'.

   After using `C-c C-y', you can use the command `C-c C-q'
(`mail-fill-yanked-message') to fill the paragraphs of the yanked old
message or messages.  One use of `C-c C-q' fills all such paragraphs,
each one individually.

   Mail mode defines the character `%' as part of a word; this is
helpful for using the word commands to edit mail addresses.

   Turning on Mail mode (which `C-x m' does automatically) runs the
normal hooks `text-mode-hook' and `mail-mode-hook'.  Initializing a new
outgoing message runs the normal hook `mail-setup-hook'; if you want to
add special fields to your mail header or make other changes to the
appearance of the mail buffer, use that hook.  Note: Hooks.

   The main difference between these hooks is just when they are
invoked.  Whenever you type `M-x mail', `mail-mode-hook' runs as soon
as the `*mail*' buffer is created.  Then the `mail-setup' function puts
in the default contents of the buffer.  After these default contents
are inserted, `mail-setup-hook' runs.


automatically generated by info2www