Note: HTML conversion may not be complete.
This section covers how messages and folders can be moved about or manipulated. Messages may be incorporated into your +inbox, deleted, and refiled. Messages containing shar or uuencode output can be stored. Folders can be visited, sorted, packed, or deleted. Here's a list of the available commands to do these things:
Command | Description __________________|____________________________________________ i | Incorporate new mail into folder d | Delete message C-d | Delete message, don't move to next message M-s | Find messages that meet search criteria o | Output (refile) message to folder c | Copy message to folder C-o | Output (write) message to file ! | Repeat last refile or write l | Print message | | Pipe message through shell command M-n | Unpack message created with uudecode or | shar M-l | List all folders M-f | Visit folder M-r | Regenerate scan lines M-x mh-sort-folder| Sort folder M-p | Pack folder M-k | Remove folder x | Execute pending refiles and deletes u | Undo pending refile or delete M-u | Undo all pending refiles and deletes q | Quit __________________|____________________________________________
Emacs can notify you when you have new mail by displaying Mail in the mode line. To enable this behavior, and to have a clock in the mode line besides, add the following to ~/.emacs:
If you are refiling several messages into the same folder, you can use the ! command to repeat the last refile or write (see the description of C-o below). Or, place the messages into a sequence (the Section Using Sequences) and specify a prefix argument to o, in which case you'll be prompted for the name of the sequence (for example, C-u o search RET).
If you wish to copy a message to another folder, you can use the c command (see "Linking Messages into More than One Folder" in the Section Moving and Linking Messages: refile). You are prompted for a folder, and you can specify a prefix argument if you want to copy a sequence into another folder. In this case, you are then prompted for the sequence. Note that unlike the o command, the copy takes place immediately. The original copy remains in the current folder.
When you want to read the messages that you have refiled into folders, use the M-f command to visit the folder. You are prompted for the folder name. You can create folders in this way, too.
Other commands you can perform on folders include: M-l, to list all the folders in your mail directory; M-k, to remove a folder; M-x mh-sort-folder, to sort the messages by date (see the Section Sorting Messages: sortm about sorting by other criteria); M-p, to pack a folder, removing gaps from the numbering sequence; and M-r, to rescan the folder, which is useful to grab all messages in your +inbox after processing your new mail. If you don't want to rescan the entire folder, give M-r or M-p a prefix argument and you'll be prompted for a range of messages to display (for instance, C-u M-r last:50 RET).
You can also pipe the message through a UNIX shell command with the | command. You are prompted for the UNIX command through which you wish to run your message. If you give an argument to this command, the message header is included in the text passed to the command (the contrived example C-u | lpr, would be done with the l command instead).
If the message is a shell archive (shar(1)) or has been run through uuencode(1), use M-n to extract the body of the message. The default directory for extraction is the current directory, and you have a chance to specify a different extraction directory. The next time you use this command, the default directory is the last directory you used.
If you've marked messages to be deleted or refiled and you want to go ahead and delete or refile the messages, use x. Many mh-e commands that may affect the order of the messages (such as M-r or M-p) will ask if you want to process refiles or deletes first and then either run x for you or undo the pending refiles and deletes, which are lost.
When you want to quit using mh-e and go back to editing, you can use the q command. This buries the mh-e buffers and restores the buffers that were present when you first ran M-x mh-rmail. You can later restore your mh-e session by selecting the +inbox buffer or by running M-x mh-rmail again.
Two sequences are maintained internally by mh-e and pushed out to MH when you type either the x or q command. They are the sequence specified by your Unseen-Sequence: profile entry and cur. However, you can also just update MH's state with the command M-x mh-update-sequences. See the Section Viewing Your Mail for an example of how this command might be used.
[Table of Contents] [Index] [Previous: Editing a Draft] [Next: Searching Through Messages]
This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely-available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.
Suggestions are welcome: Bill Wohler <firstname.lastname@example.org>