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, 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 a 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, type n and VM will move 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 removed right away; VM
makes a note that you want the message to be removed later. If you
change your mind about deleting a message, select it and type u
vm-undelete-message), 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 display a window
containing a summary of the 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) saves the folder. Note that deleted messages are
not expunged automatically when you save a folder; this is a change from
version 4 of VM. The next time you visit the folder any deleted
messages will still be flagged for deletion.
When a folder is first visited, the value of the variable
vm-folder-file-precious-flag is used to initialize a
buffer-local instance of
determines how folders are saved. A non-nil value causes
folders to be saved by writing to a temporary file and then
replacing the folder with that file. A nil value causes
folders to be saved by writing directly to the folder without
the use of a temporary file.
If the folder is empty at the time you save it and the variable
vm-delete-empty-folders is non-
nil, VM will remove
the zero length folder after saving it.
To quit visiting a folder you can type q (
vm-quit-no-change). Typing q saves the current
folder before quitting. Also, any messages flagged new are changed to
be flagged as old and unread, before saving. The x command quits
a folder without changing the status of new messages, saving or
otherwise modifying the current folder.
If the variable
vm-confirm-quit is set to
VM will always ask for confirmation before ending a VM
visit of a folder. A
nil value means VM will ask only
when messages will be lost unwittingly by quitting, i.e. not
removed by intentional delete and expunge. A value that is
t causes VM to ask only when
there are unsaved changes to message attributes or when messages
will be lost.
You do not have to quit a folder to continue using Emacs for other
vm-quit-just-bury) buries the buffers associated with
the current folder deep in Emacs' stack of buffers, but otherwise leaves
the folder visited so that you can resume reading messages quickly. You
can locate the folder's buffers again by using
which is normally bound to C-x C-b.
Another command you can use if you are using a window system like X
vm-quit-just-iconify. This command buries the
folder's buffers like
vm-quit-just-bury and also iconifies the
At any time while reading mail in any folder you can type g
vm-get-new-mail) to check to see if new mail for that folder has
arrived. If new mail has arrived it will be moved from the spool file
or spool files associated with the current folder and merged into the
folder. If you are not in the middle of another message, VM will also
move to the first new or unread 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 no messages are
deleted from it as they would be for a spool file.
By default your primary inbox has your system mailbox associated with
it, e.g. `/var/spool/mail/kyle', and so typing g will retrieve
mail from this file. Your system mailbox is one example of a spool
file, a file that the mail transport system delivers messages into.
You can associate other spool files with your primary inbox and spool
files with other folders by setting the variable
vm-spool-files. See section Spool Files.
Go to the first, previous, next, last section, table of contents.