1MH-DRAFT(5)                   File Formats Manual                  MH-DRAFT(5)
2
3
4

NAME

6       mh-draft - draft folder facility for nmh message system
7

DESCRIPTION

9       There  are a number of interesting advanced facilities for the composi‐
10       tion of outgoing mail.
11
12   The Draft Folder
13       The comp, dist, forw, repl, send,  and  whom  commands  each  take  the
14       switches -draftfolder +folder and -draftmessage msg, which allow you to
15       manipulate the various draft messages you are composing.
16
17       If -draftfolder +folder is used, draft messages will be constructed  in
18       the  indicated folder.  The “Draft-Folder” profile entry may be used to
19       specify a default draft folder.
20
21       If the switch -draftmessage msg is given, the specified draft  is  used
22       to  compose  the  message.   If -draftmessage msg is not used, then the
23       draft defaults to `new' (create a new draft) unless  the  user  invokes
24       comp with -use, in which case the default is `cur'.
25
26       Hence,  the  user may have several message compositions in progress si‐
27       multaneously.  Now, all of the nmh tools are available on each  of  the
28       user's  message  drafts  (e.g.   show,  scan, pick, and so on).  If the
29       folder does not exist, the user is asked if it should be created  (just
30       like  with  refile).   The last draft message the user was composing is
31       known as `cur' in the draft folder.
32
33       Using send, the user can send drafts using the standard nmh `msgs' con‐
34       vention  with  -draftmessage msgs.  If no `msgs' are given, it defaults
35       to `cur'.
36
37       In addition, all of these programs have a -nodraftfolder switch,  which
38       undoes  the last occurrence of -draftfolder folder (useful if a default
39       is specified in the user's nmh profile).
40
41       If the user does not give the -draftfolder  +folder  switch,  then  all
42       these commands act “normally”.  Note that the -draft switch to send and
43       show still refers to the file called `draft' in the user's  nmh  direc‐
44       tory.   In  the  interests of economy of expression, when using comp or
45       send, the user needn't prefix the draft `msg' or `msgs' with -draftmes‐
46       sage.   Both  of these commands accept a `file' or `files' argument and
47       they will, if given -draftfolder  +folder,  treat  these  arguments  as
48       `msg' or `msgs'.  (This may appear to be inconsistent, at first, but it
49       saves a lot of typing.)  Hence,
50
51              send -draftfolder +drafts first
52
53       is the same as
54
55              send -draftfolder +drafts -draftmessage first
56
57       To make all this a bit more clear, here are some examples.   Let's  as‐
58       sume that the following entries are in the nmh profile:
59
60            Draft-Folder: drafts
61            sendf: -draftfolder +drafts
62
63       Furthermore,  let's  assume that the program sendf is a (symbolic) link
64       in the user's $HOME/bin/ directory to send.  Now,
65
66            comp
67            dist
68            forw
69            repl
70
71       will construct the message draft in the `drafts' folder using the `new'
72       message  number.  Furthermore, they each define `cur' in this folder to
73       be that message draft.  If the user were to use the quit option at  the
74       `What  now?'  prompt,  then later on, if no other draft composition was
75       done, the draft could be sent with simply
76
77            sendf
78
79       Or, if more editing was required, the draft could be edited with
80
81            comp -use
82
83       If other drafts had been composed in the meantime, so that this message
84       draft was no longer known as `cur' in the `draft' folder, then the user
85       could scan the folder to see which message draft  should  be  used  for
86       editing  or  sending.  Clever users could even employ a backquoted pick
87       to do the work:
88
89            comp -use `pick +drafts -to nmh-workers`
90
91       or
92
93            sendf `pick +drafts -to nmh-workers`
94
95       Note that in the comp example, the output from pick must resolve  to  a
96       single  message draft (it makes no sense to talk about composing two or
97       more drafts with one invocation of comp).  In contrast, in the send ex‐
98       ample, as many message drafts as desired can appear, since send doesn't
99       mind sending more than one draft at a time.
100
101       Note that the argument -draftfolder +folder is not included in the pro‐
102       file entry for send, since when comp, et al, invoke send directly, they
103       supply send with  the  Unix  pathname  of  the  message  draft;  not  a
104       -draftmessage  msg  argument.   As  far  as  send is concerned, a draft
105       folder is not being used.
106
107       It is important to realize that nmh treats  the  draft  folder  like  a
108       standard nmh folder in nearly all respects.  There are two exceptions:
109
110       First, under no circumstances will the -draftfolder folder switch cause
111       the named folder to become  the  current  folder.   Obviously,  if  the
112       folder appeared in the context of a standard +folder argument to an nmh
113       program, as in
114
115            scan +drafts
116
117       it might become the current folder, depending on the context changes of
118       the nmh program in question.
119
120       Second,  although  conceptually  send  deletes  the `msgs' named in the
121       draft folder, it does not call delete-prog to perform the deletion.
122
123   What Happens if the Draft Exists
124       When the comp, dist, forw, and repl commands are invoked and the  draft
125       you indicated already exists, these programs will prompt the user for a
126       response directing the program's action.  The prompt is
127
128            Draft "/home/foobar/nmhbox/draft" exists (xx bytes).
129            Disposition?
130
131       The appropriate responses and their meanings are:
132
133            replace   deletes the draft and starts afresh
134            list      lists the draft
135            refile    files the draft into a folder and starts afresh
136            quit      leaves the draft intact and exits
137
138       In addition, if you specified -draftfolder folder to the command,  then
139       one other response will be accepted:
140
141            new       creates a new draft
142
143       just as if -draftmessage new had been given.  Finally, the comp command
144       will accept one more response:
145
146            use       re-uses the draft
147
148       just as if -use had been given.
149

FILES

151       $HOME/.mh_profile   The user's profile.
152

PROFILE COMPONENTS

154       Draft-Folder:       For a default draft folder
155

CONTEXT

157       None
158
159
160
161nmh-1.8                           2012-03-18                       MH-DRAFT(5)
Impressum