VM (View Mail) is an Emacs subsystem that allows UNIX mail to be read and disposed of within Emacs. Commands exist to do the normal things expected of a mail user agent, such as generating replies, saving messages to folders, deleting messages and so on. There are other more advanced commands that do tasks like bursting and creating digests, message forwarding, and organizing message presentation according to various criteria.
To invoke VM simply type M-x vm. VM gathers any mail that has arrived in your system mailbox and appends it to a file known as your primary inbox, and visits that file for reading. See section Starting Up. A file visited for reading by VM is called the current folder.
If there are any messages in the primary inbox, VM selects the first new
or unread message, and previews it. Previewing is VM's way of
showing you part of message and allowing you to decide whether you want
to read it. See section Previewing. By default VM shows you the message's
sender, recipient, subject and date headers. Typing SPC
vm-scroll-forward) exposes the body of the message and flags the
message as read. Subsequent SPC's scroll forward through the
message, b or DEL scrolls backward. When you reach the end
of a message, typing SPC or n moves you forward to preview
the next message. See section Paging.
If you do not want to read a message that's being previewed, just type n and VM will move on to the next message (if there is one). See section Selecting Messages.
To save a message to a mail folder use s (
VM will prompt you for the folder name in the minibuffer.
See section Saving Messages.
Messages are deleted by typing d (
previewing or reading them. The message is not deleted right away; it
is simply flagged for deletion. If you change your mind about deleting a
message just select it and type u (
and the message will be undeleted. See section Deleting Messages. The
actual removal of deleted messages from the current folder is called
expunging and it is accomplished by typing #
vm-expunge-folder). The message is still present in the on-disk
version of the folder until the folder is saved.
Typing h (
vm-summarize) causes VM to pop up a window
containing a summary of contents of the current folder. The summary is
presented one line per message, by message number, listing each message's
author, date sent, line and byte count, and subject. Also various
letters appear beside the message number to indicate that a message is
new, unread, flagged for deletion, etc. An arrow `->' appears to
the left of the line summarizing the current message. The summary
format is user configurable, see section Summaries.
When you are finished reading mail the current folder must be saved, so
that the next time the folder is visited VM will know which messages have
been already read, replied to and so on. Typing S
vm-save-folder) expunges all deleted messages and saves the
folder. C-x C-s saves the folder without expunging deleted
messages but the messages are still flagged deleted. The next time the
folder is visited these messages will still be flagged for deletion.
To quit VM you can type q (
vm-quit) or x
vm-quit-no-change). Typing q expunges and saves the
current folder before quitting. Also, any messages flagged new are
changed to be flagged unread, before saving. The x command quits
VM without expunging, saving or otherwise modifying the current folder.
Quitting is not required; you can simply switch to another Emacs buffer
when you've finished reading mail.
At any time while reading mail in the primary inbox you can type g
vm-get-new-mail) to check to see if new mail has arrived. If new
mail has arrived it will be moved from the system spool area and merged into
the primary inbox. If you are not in the middle of another message, VM
will also jump to the first new message, if you are not in the midst of
reading another message.
vm-get-new-mail is given a prefix argument, it will prompt for
another file from which to gather messages instead of the usual spool
files. In this case the source folder is copied but not deleted.