MH-E has analogies for each of the MH folder and
refile commands27. To refile a message in
another folder, use the command o (mh-refile-msg)
(mnemonic: “output”). You are prompted for the folder name
(see Folder Selection). Note that this command can also be used to
create folders. If you specify a folder that does not exist, you will
be prompted to create it. The hook mh-refile-msg-hook is called
after a message is marked to be refiled.

If you are refiling several messages into the same folder, you can use
the command ! (mh-refile-or-write-again) to repeat the
last refile or write (for the description of >
(mh-write-msg-to-file), see Files and Pipes). You can use a
range in either case (for example, C-u o 1 3 5-7 last:5 frombob
RET, see Ranges).

If you’ve deleted a message or refiled it, but changed your mind, you
can cancel the action before you’ve executed it. Use u
(mh-undo) to undo a refile on or deletion of a single message.
You can also undo refiles and deletes for messages that are found in a
given range (see Ranges).

Alternatively, you can use F u (mh-undo-folder) to undo
all refiles and deletes in the current folder.

If you’ve marked messages to be deleted or refiled and you want to go
ahead and delete or refile the messages, use x
(mh-execute-commands). Many MH-E commands that may affect the
numbering of the messages (such as F r or F 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.

The command x runs mh-before-commands-processed-hook
before the commands are processed and
mh-after-commands-processed-hook after the commands are
processed. Variables that are useful with the former hook include
mh-delete-list and mh-refile-list which can be used to
see which changes will be made to the current folder,
mh-current-folder. Variables that are useful with the latter
hook include mh-folders-changed, which lists which folders were
affected by deletes and refiles. This list will always include the
current folder mh-current-folder.

If you wish to copy a message to another folder, you can use the
command c (mh-copy-msg) (see the -link argument
to refile(1)). Like the command o, this command
prompts you for the name of the target folder and you can specify a
range (see Ranges). Note that unlike the command o, the copy
takes place immediately. The original copy remains in the current
folder.

The command t (mh-toggle-showing) switches between
MH-Folder mode and MH-Folder Show mode28. MH-Folder mode turns off
the associated show buffer so that you can perform operations on the
messages quickly without reading them. This is an excellent way to
prune out your junk mail or to refile a group of messages to another
folder for later examination.

When you use t to toggle from MH-Folder Show mode to MH-Folder
mode, the MH-Show buffer is hidden and the MH-Folder buffer is left
alone. Setting mh-recenter-summary-flag to a non-nil
value causes the toggle to display as many scan lines as possible,
with the cursor at the middle. The effect of
mh-recenter-summary-flag is rather useful, but it can be
annoying on a slow network connection.

When you want to read the messages that you have refiled into folders,
use the command F v (mh-visit-folder) to visit the
folder. You are prompted for the folder name. The folder buffer will
show just unseen messages if there are any; otherwise, it will show
all the messages in the buffer as long there are fewer than
mh-large-folder messages. If there are more, then you are
prompted for a range of messages to scan. You can provide a prefix
argument in order to specify a range of messages to show when you
visit the folder (see Ranges). In this case, regions are not used
to specify the range and mh-large-folder is ignored. Note that
this command can also be used to create folders. If you specify a
folder that does not exist, you will be prompted to create it.

If you forget where you’ve refiled your messages, you can find them
using F s (mh-search). See Searching.

If you use a program such as procmail to file your incoming
mail automatically, you can display new, unseen, messages using the
command F n (mh-index-new-messages). All messages in the
‘unseen’ sequence from the folders in
mh-new-messages-folders are listed. However, this list of
folders can be overridden with a prefix argument: with a prefix
argument, enter a space-separated list of folders, or nothing to
search all folders.

If you have ticked messages (see Sequences), you can display them
using the command F ' (mh-index-ticked-messages). All
messages in the ‘tick’ sequence from the folders in
mh-ticked-messages-folders are listed. With a prefix argument,
enter a space-separated list of folders, or nothing to search all
folders.

You can display messages in any sequence with the command F q
(mh-index-sequenced-messages). All messages from the folders in
mh-new-messages-folders in the sequence you provide are listed.
With a prefix argument, enter a space-separated list of folders at the
prompt, or nothing to search all folders.

Set the options mh-new-messages-folders and
mh-ticked-messages-folders to ‘Inbox’ to search the
‘+inbox’ folder or ‘All’ to search all of the top level
folders. Otherwise, list the folders that should be searched with the
‘Choose Folders’ menu item. See mh-recursive-folders-flag.

Other commands you can perform on folders include: F l
(mh-list-folders), to place a listing of all the folders in
your mail directory in a buffer called *MH-E Folders*
(see Miscellaneous); F k (mh-kill-folder), to remove
a folder; F S (mh-sort-folder), to sort the messages by
date (see sortm(1) to see how to sort by other criteria);
F p (mh-pack-folder), to pack a folder, removing gaps
from the numbering sequence; and F r (mh-rescan-folder),
to rescan the folder, which is useful to grab all messages in your
‘+inbox’ after processing your new mail for the first time. If
you don’t want to rescan the entire folder, the commands F r or
F p will accept a range (see Ranges).

The command F p runs mh-pack-folder-hook after
renumbering the messages. A variable that is useful with this hook
is mh-current-folder.

By default, operations on folders work only one level at a time. Set
mh-recursive-folders-flag to non-nil to operate on all
folders. This mostly means that you’ll be able to see all your folders
when you press TAB when prompted for a folder name.

The hook mh-kill-folder-suppress-prompt-functions is an abnormal
hook run at the beginning of the command k. The hook functions
are called with no arguments and should return a non-nil value to
suppress the normal prompt when you remove a folder. This is useful
for folders that are easily regenerated. The default value of
mh-search-p suppresses the prompt on folders generated by
searching.

NOTE

Use this hook with care. If there is a bug in your hook which returns
t on ‘+inbox’ and you press k by accident in the
+inbox folder, you will not be happy.

The option mh-sortm-args holds extra arguments to pass on to
the command sortm29 when a prefix argument is used with F S. Normally
default arguments to sortm are specified in the MH profile.
This option may be used to provide an alternate view. For example,
‘'(\"-nolimit\" \"-textfield\" \"subject\")’ is a useful setting.

When you want to quit using MH-E and go back to editing, you can use
the q (mh-quit) command. This buries the buffers of the
current MH-E folder and restores the buffers that were present when
you first ran M-x mh-rmail. It also removes any MH-E working
buffers whose name begins with ‘ *mh-’ or *MH-E
(see Miscellaneous). You can later restore your MH-E session by
selecting the ‘+inbox’ buffer or by running M-x mh-rmail
again.

The two hooks mh-before-quit-hook and mh-quit-hook are
called by q. The former one is called before the quit occurs, so
you might use it to perform any MH-E operations; you could perform
some query and abort the quit or call mh-execute-commands, for
example. The latter is not run in an MH-E context, so you might use it
to modify the window setup. If you find that q buries a lot of
buffers that you would rather remove, you can use both
mh-before-quit-hook and mh-quit-hook to accomplish that.

You can use dired to manipulate the folders themselves. For example, I
renamed my ‘+out’ folder to the more common ‘+outbox’ by
running dired on my mail directory (M-x dired RET ~/Mail RET),
moving my cursor to ‘out’ and using the command R
(dired-do-rename).