mh-e. Node: Sequences

PREV Searching UP Using mh-e NEXT Miscellaneous

2.6: Using Sequences

For the whole scoop on MH sequences, refer to mh-sequence(5). As you've read, several of the mh-e commands can operate on a sequence, which is a shorthand for a range or group of messages. For example, you might want to forward several messages to a friend or colleague. Here's how to manipulate sequences.


Put message in a sequence (mh-put-msg-in-seq).


Display sequences that message belongs to (mh-msg-is-in-seq).


List all sequences in folder (mh-list-sequences).


Remove message from sequence (mh-delete-msg-from-seq).


Delete sequence (mh-delete-seq).

C-x n

Restrict display to messages in sequence (mh-narrow-to-seq).

C-x w

Remove restriction; display all messages (mh-widen).

M-x mh-update-sequences

Push mh-e's state out to MH.

To place a message in a sequence, use % (mh-put-msg-in-seq) to do it manually, or use the MH command pick or the mh-e version of pick (Searching) which create a sequence automatically. Give % a prefix argument and you can add all the messages in one sequence to another sequence (for example, C-u % SourceSequence RET).

Once you've placed some messages in a sequence, you may wish to narrow the field of view to just those messages in the sequence you've created. To do this, use C-x n (mh-narrow-to-seq). You are prompted for the name of the sequence. What this does is show only those messages that are in the selected sequence in the MH-Folder buffer. In addition, it limits further mh-e searches to just those messages. When you want to widen the view to all your messages again, use C-x w (mh-widen).

You can see which sequences a message is in with the ? (mh-msg-is-in-seq) command. Or, you can list all sequences in a selected folder (default is current folder) with M-q (mh-list-sequences).

If you want to remove a message from a sequence, use M-% (mh-delete-msg-from-seq), and if you want to delete an entire sequence, use M-# (mh-delete-seq). In the latter case you are prompted for the sequence to delete. Note that this deletes only the sequence, not the messages in the sequence. If you want to delete the messages, use C-u d (see Deleting above).

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 Customizing Viewing for an example of how this command might be used.

With the exceptions of C-x n and C-x w, the underlying MH command dealing with sequences is mark.

PREV Searching UP Using mh-e NEXT Miscellaneous