source: trunk/third/nmh/man/mh-draft.man @ 12455

Revision 12455, 6.2 KB checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12454, which included commits to RCS files with non-trunk default branches.
Line 
1.\"
2.\" %nmhwarning%
3.\" $Id: mh-draft.man,v 1.1.1.1 1999-02-07 18:14:20 danw Exp $
4.\"
5.\" include the -mh macro file
6.so %etcdir%/tmac.h
7.\"
8.TH MH-DRAFT %manext5% MH.6.8 [%nmhversion%]
9.SH NAME
10mh-draft \- draft folder facility for nmh message system
11.SH SYNOPSIS
12.in +.5i
13.ti -.5i
14any \fInmh\fR command
15.in -.5i
16.SH DESCRIPTION
17
18There are a number of interesting advanced facilities for the composition of
19outgoing mail.
20
21.Uh "The Draft Folder"
22The \fIcomp\fR, \fIdist\fR, \fIforw\fR, and \fIrepl\fR commands have
23two additional switches, `\-draftfolder\ +folder' and `\-draftmessage\ msg'
24which allow you to manipulate the various draft messages you are composing.
25
26If `\-draftfolder\ +folder' is used, these commands are
27directed to construct a draft message in the indicated folder.
28(The \*(lqDraft\-Folder:\*(rq profile entry may be used to declare a
29default draft folder for use with \fIcomp\fR, \fIdist\fR, \fIforw\fR,
30and \fIrepl\fR).
31
32If the swith `\-draftmessage\ msg' is given, the specified draft is used
33to compose the message.  If `\-draftmessage\ msg' is not used, then the
34draft defaults to `new' (create a new draft) unless the user invokes
35\fIcomp\fR with `\-use', in which case the default is `cur'.
36
37Hence, the user may have several message compositions in progress
38simultaneously.  Now, all of the \fInmh\fR tools are available on each of
39the user's message drafts (e.g., \fIshow\fR, \fIscan\fR, \fIpick\fR, and
40so on).  If the folder does not exist, the user is asked if it should be
41created (just like with \fIrefile\fR).  Also, the last draft message
42the user was composing is known as `cur' in the draft folder.
43
44Furthermore, the \fIsend\fR command has these switches as well.  Hence,
45from the shell, the user can send off whatever drafts desired using the
46standard \fInmh\fR `msgs' convention with `\-draftmessage msgs'.  If no
47`msgs' are given, it defaults to `cur'.
48
49In addition, all five programs have a `\-nodraftfolder' switch, which
50undoes the last occurrence of `\-draftfolder\ folder' (useful if the
51latter occurs in the user's \fInmh\fR profile).
52
53If the user does not give the `\-draftfolder\ +folder' switch, then
54all these commands act ``normally''.  Note that the `\-draft' switch
55to \fIsend\fR and \fIshow\fR still refers to the file called `draft'
56in the user's \fInmh\fR directory.  In the interests of economy of
57expression, when using \fIcomp\fR or \fIsend\fR, the user needn't
58prefix the draft `msg' or `msgs' with `\-draftmessage'.  Both of these
59commands accept a `file' or `files' argument, and they will, if given
60`\-draftfolder\ +folder' treat these arguments as `msg' or `msgs'.
61(This may appear to be inconsistent, at first, but it saves a lot of
62typing) Hence,
63
64.ti +.5i
65send -draftf +drafts first
66
67is the same as
68
69.ti +.5i
70send -draftf +drafts -draftm first
71
72To make all this a bit more clear, here are some examples.  Let's assume
73that the following entries are in the \fInmh\fR profile:
74
75.in +.5i
76.nf
77Draft\-Folder: +drafts
78sendf: -draftfolder +drafts
79.fi
80.in -.5i
81
82Furthermore, let's assume that the program \fIsendf\fR is a (symbolic)
83link in the user's \fB$HOME/bin/\fR directory to \fIsend\fR.  Then, any
84of the commands
85
86.in +.5i
87.nf
88comp
89dist
90forw
91repl
92.fi
93.in -.5i
94
95constructs the message draft in the `draft' folder using the `new'
96message number.  Furthermore, they each define `cur' in this folder to
97be that message draft.  If the user were to use the \fIquit\fR option
98at `What now?' level, then later on, if no other draft composition was
99done, the draft could be sent with simply
100
101.ti +.5i
102sendf
103
104Or, if more editing was required, the draft could be edited with
105
106.ti +.5i
107comp -use
108
109Instead, if other drafts had been composed in the meantime, so that this
110message draft was no longer known as `cur' in the `draft' folder, then
111the user could \fIscan\fR the folder to see which message draft in the
112folder should be used for editing or sending.  Clever users could even
113employ a back-quoted \fIpick\fR to do the work:
114
115.ti +.5i
116comp -use `pick +drafts -to nmh-workers`
117
118or
119
120.ti +.5i
121sendf `pick +drafts -to nmh-workers`
122
123Note that in the \fIcomp\fR example, the output from \fIpick\fR must
124resolve to a single message draft (it makes no sense to talk about
125composing two or more drafts with one invocation of \fIcomp\fR).
126In contrast, in the \fIsend\fR example, as many message drafts as desired
127can appear, since \fIsend\fR doesn't mind sending more than one draft
128at a time.
129
130Note that the argument `\-draftfolder\ +folder' is not included in the
131profile entry for \fIsend\fR, since when \fIcomp\fR, et. al., invoke
132\fIsend\fR directly, they supply \fIsend\fR with the UNIX pathname
133of the message draft, and \fBnot\fR a `draftmessage\ msg' argument.
134As far as \fIsend\fR is concerned, a \fIdraft folder\fR is not being used.
135
136It is important to realize that \fInmh\fR treats the draft folder
137like a standard \fInmh\fR folder in nearly all respects.  There are
138two exceptions:
139
140First, under no circumstancs will the `\-draftfolder\ folder' switch cause the
141named folder to become the current folder.
142
143Obviously, if the folder appeared in the context of a standard `+folder'
144argument to an \fInmh\fR program, as in
145
146.ti +.5i
147scan +drafts
148
149it might become the current folder, depending on the context changes of
150the \fInmh\fR program in question.
151
152Second, although conceptually \fIsend\fR deletes the `msgs' named in
153the draft folder, it does not call `delete-prog' to perform the deletion.
154
155.Uh "What Happens if the Draft Exists"
156When the \fIcomp\fR, \fIdist\fR, \fIforw\fR, and \fIrepl\fR commands
157are invoked and the draft you indicated already exists, these programs
158will prompt the user for a reponse directing the program's action.
159The prompt is
160
161.ti +.5i
162Draft ``/home/foobar/nmhbox/draft'' exists (xx bytes).
163.ti +.5i
164Disposition?
165
166The appropriate responses and their meanings are:
167
168.nf
169^replace - deletes the draft and starts afresh
170^list - lists the draft
171^refile - files the draft into a folder and starts afresh
172^quit - leaves the draft intact and exits
173.fi
174
175In addition, if you specified `\-draftfolder\ folder' to the command,
176then one other response will be accepted:
177
178.nf
179^new - finds a new draft,
180.fi
181
182just as if `\-draftmessage\ new' had been given.
183Finally, the \fIcomp\fR command will accept one more response:
184
185.nf
186^use - re-uses the draft
187.fi
188
189just as if `\-use' had been given.
190.Co
191None
192.En
Note: See TracBrowser for help on using the repository browser.