Computing Facilities    links to the SCS and CMU home pages Carnegie Mellon School of Computer Science Carnegie Mellon University
 
Advanced search tips 
 Documentation
 » Introduction to Facilities 
 » Accounts & passwords 
 » AFS 
 » Application software 
 » AV help 
 » Backups & restores 
 » E-mail & netnews 
 » Networking 
 » Printing 
 » Purchasing 
 » Security 
 » Software licensing 
 » Support charges 
 » Web publishing 
 » Your health 
 » Macintosh support 
 » Unix/Linux support 
 » Windows PC support 

Advanced folder features: draftfolder and subfolders

Draftfolder

When you create a mail message with comp, forw, or repl, your message is stored in the file $HOME/Mail/draft until you send it. Generally, this means that you cannot start working on another message until you have sent this draft because the mail composition programs will try to use the existing draft file, which you may have wanted to save for later.

To allow for several message drafts, use MH's draftfolder facility. The steps below describe how to create a folder called drafts, start composing two messages, and then return to the first draft:

  1. Type "folder +drafts" to create a folder called drafts.
  2. Type "comp -draftfolder +drafts" to create a message, then quit without sending the message. Your message draft will be saved as message number "1" in the drafts folder.
  3. Type "comp -draftfolder +drafts" to create another message. You will not be asked about an existing draft, and the new draft will be assigned the message number "2" in the drafts folder.
  4. To go back to composing your first draft message, type "comp -draftfolder +drafts -use 1". If you send this message, its draft will be deleted from the drafts folder.

The advantage of using a draftfolder is that you can treat your drafts as MH messages. For instance, you can see a summary of the drafts you are composing by typing "scan +drafts". Moreover, all of your pending messages are stored in one place. If you want to use a draftfolder each time you compose a message, add the following line to your .mh_profile:

Draft-Folder:drafts

This entry eliminates the needs for typing "-draftfolder +drafts" each time your run comp.

Subfolders

Just as Unix has subdirectories, MH has subfolders. If you get a large amount of mail and feel that you need more than a single level of organization, you may want to use subfolders.

Supposing that you have a folder called friends, you could type the following commands to create subfolders called joe, bill, and kelly:

% folder +friends/joe
Create folder "/usr/jb/Mail/friends/joe"? y
friends/joe+ has no messages.
% folder +friends/bill
Create folder "/usr/jb/Mail/friends/bill"? y
friends/bill+ has no messages.
% folder +friends/kelly
Create folder "/usr/jb/Mail/friends/kelly"? y
friends/kelly+ has no messages.

You can now use these folders as you would use any others. For example:

refile 1 2 5 6 +friends/kelly

would place messages 1, 2, 5, and 6 in the kelly subfolder of the friends folder.

If my current folder were friends, I could use a special abbreviation to refer to any of these subfolders. Using an "@" instead of a "+" specifies a folder directly beneath the current folder.

Example:

% folder +friends
friends+ has no messages.
% folder @bill
friends/bill+ has no messages.

List subfolders under your current folder by typing:

folder -recurse -fast

Using "fast" speeds output by limiting it to only the folder names. Similarly, "folders -recurse -fast" gives you a complete list of your folders, including all subfolders.