whom commands have two additional switches,
msg which allow you to manipulate the various draft messages you are composing.
+folder is used, these commands are
directed to construct a draft message in the indicated folder.
Draft-Folder profile entry may be used to declare a default draft folder for use with
If the switch
msg is given, the specified draft is used to compose the message. If
msg is not used, then the
draft defaults to new (create a new draft) unless the user invokes
-use, in which case the default is cur.
Hence, the user may have several message compositions in progress
simultaneously. Now, all of the
nmh tools are available on each of the users message drafts (e.g.
pick, and so on). If the folder does not exist, the user is asked if it should be
created (just like with
refile). Also, the last draft message
the user was composing is known as cur in the draft folder.
send command has these switches as well. Hence,
from the shell, the user can send off whatever drafts desired using the
nmh msgs convention with
msgs. If no msgs are given, it defaults to cur.
In addition, all five programs have a
-nodraftfolder switch, which undoes the last occurrence of
folder (useful if the latter occurs in the users
If the user does not give the
+folder switch, then all these commands act normally. Note that the
-draft switch to
show still refers to the file called draft in the users
nmh directory. In the interests of economy of expression, when using
send, the user neednt prefix the draft msg or msgs with
-draftmessage. Both of these
commands accept a file or files argument, and they will, if given
+folder treat these arguments as msg or msgs. (This may appear to be
inconsistent, at first, but it saves a lot of typing) Hence,
send -draftfolder +drafts first
is the same as
send -draftfolder +drafts -draftmessage first
To make all this a bit more clear, here are some examples. Lets assume
that the following entries are in the
sendf: -draftfolder +drafts
Furthermore, lets assume that the program
sendf is a (symbolic) link in the users
$HOME/bin/ directory to
send. Then, any of the commands
constructs the message draft in the draft folder using the new
message number. Furthermore, they each define cur in this folder to
be that message draft. If the user were to use the
quit option at What now? level, then later on, if no other draft composition
was done, the draft could be sent with simply
Or, if more editing was required, the draft could be edited with
Instead, if other drafts had been composed in the meantime, so that this
message draft was no longer known as cur in the draft folder, then
the user could
scan the folder to see which message draft in the
folder should be used for editing or sending. Clever users could even
employ a backquoted
pick to do the work:
comp -use pick +drafts -to nmh-workers
sendf pick +drafts -to nmh-workers
Note that in the
comp example, the output from
pick must resolve to a single message draft (it makes no sense to talk about
composing two or more drafts with one invocation of
comp). In contrast, in the
send example, as many message drafts as desired can appear, since
send doesnt mind sending more than one draft at a time.
Note that the argument
+folder is not included in the profile entry for
send, since when
comp, et. al., invoke
send directly, they supply
send with the UNIX pathname of the message draft, and
msg argument. As far as
send is concerned, a draft folder is not being used.
It is important to realize that
nmh treats the draft folder like a standard
nmh folder in nearly all respects. There are two exceptions:
First, under no circumstancs will the
folder switch cause the named folder to become the current folder.
Obviously, if the folder appeared in the context of a standard
+folder argument to an
nmh program, as in
it might become the current folder, depending on the context changes of the
nmh program in question.
Second, although conceptually
send deletes the msgs named in the draft folder, it does not call
delete-prog to perform the deletion.