Clean up documentation formatting
[mmh] / man / comp.man
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH COMP %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 comp \- compose a message
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B comp 
11 .RI [ +folder ]
12 .RI [ msgs ]
13 .RB [ \-form
14 .IR formfile ]
15 .RB [ \-use " | " \-nouse ]
16 .RB [ \-file
17 .IR file ]
18 .RB [ \-draftfolder
19 .IR +folder ]
20 .RB [ \-draftmessage
21 .IR msg ]
22 .RB [ \-nodraftfolder ]
23 .RB [ \-editor
24 .IR editor ]
25 .RB [ \-noedit ]
26 .RB [ \-width
27 .IR columns ]
28 .RB [ \-from
29 .IR address ]
30 .RB [ \-to
31 .IR address ]
32 .RB [ \-cc
33 .IR address ]
34 .RB [ \-fcc
35 .IR +folder ]
36 .RB [ \-whatnowproc
37 .IR program ]
38 .RB [ \-nowhatnowproc ]
39 .RB [ \-version ]
40 .RB [ \-help ]
41 .ad
42 .SH DESCRIPTION
43 .B Comp
44 is used to create a new message to be mailed.  It copies a
45 message form to the draft being composed and then invokes an editor on
46 the draft (unless
47 .B \-noedit
48 is given, in which case the initial edit is suppressed).
49 .PP
50 The default message template \*(lqcomponents\*(rq will direct
51 .B comp
52 to construct the messgage draft as follows:
53 .PP
54 .RS 5
55 .nf
56 From: {from switch} or <Local-Mailbox> or <username@hostname>
57 To: {to switch} or blank
58 cc: {cc switch} or blank
59 Fcc: {fcc switch} or +outbox
60 Subject:
61 --------
62 .fi
63 .RE
64 .PP
65 If a file named
66 .RI \*(lq components \*(rq
67 exists in the user's nmh directory,
68 it will be used instead of this form.  You may specify an alternate
69 forms file with the switch
70 .B \-form
71 .IR formfile .
72 .PP
73 You may also start
74 .B comp
75 using the contents of an existing message
76 as the form.  If you supply either a
77 .I +folder
78 or
79 .I msg
80 argument, that
81 message will be used as the message form.  You may not supply both a
82 .B \-form
83 .I formfile
84 and a
85 .I +folder
86 or
87 .I msg
88 argument.  The line of
89 dashes or a blank line must be left between the header and the body of
90 the message for the message to be identified properly when it is sent
91 (see
92 .BR send (1)).
93 .PP
94 The switch
95 .B \-use
96 directs
97 .B comp
98 to continue editing an already
99 started message.  That is, if a
100 .B comp
101 (or
102 .BR dist ,
103 .BR repl ,
104 or
105 .BR forw )
106 is terminated without sending the draft, the draft can
107 be edited again via
108 .RB \*(lq comp
109 .BR \-use \*(rq.
110 .PP
111 The
112 .B \-file
113 .I file
114 switch says to use the named file as the message draft.
115 .PP
116 Forms that are selected via the
117 .B \-form
118 switch are processed via the mh template system; see 
119 .BR mh\-format (5)
120 for details.  Drafts constructed from another mssage or with the
121 .B \-use
122 or
123 .B \-file
124 switchs will NOT be processed with
125 .BR mh\-format (5).
126 .PP
127 In addition to the standard
128 .BR mh\-format (5)
129 escapes,
130 .B comp
131 the following
132 .I component
133 escapes are either new or have an alternate meaning:
134 .PP
135 .RS 5
136 .nf
137 .ta \w'Escape  'u +\w'Returns  'u
138 .I Escape       Returns Description
139 fcc     string  Any folders specified with `\-fcc\ folder'
140 from    string  Any addresses specified with `\-from\ address'
141 to      string  Any addresses specified with `\-to\ address'
142 cc      string  Any addresses specified with `\-cc\ address'
143 .fi
144 .RE
145 .PP
146 By default the \*(lqTo:\*(rq and \*(lqcc:\*(rq fields are empty.  You may
147 add addresses to these fields with the
148 .B \-to
149 .I address
150 and
151 .B \-cc
152 .I address
153 switches.  You may give these switches multiple times to add multiple
154 addresses.
155 .PP
156 By default the \*(lqFrom:\*(rq field has either the value of the
157 .B Local\-Mailbox
158 profile entry or a system default email address.  This default can be
159 overridden by using the
160 .B \-from
161 .I address
162 switch.
163 .PP
164 If the draft already exists,
165 .B comp
166 will ask you as to the disposition
167 of the draft.  A reply of
168 .B quit
169 will abort
170 .BR comp ,
171 leaving the draft intact;
172 .B replace
173 will replace the existing draft with
174 the appropriate form;
175 .B list
176 will display the draft;
177 .B use
178 will use the draft for further composition; and
179 .B refile
180 .I +folder
181 will file the draft in the given folder, and give you a new draft with the
182 appropriate form.  (The
183 .I +folder
184 argument to
185 .B refile
186 is required.)
187 .PP
188 The
189 .B \-draftfolder
190 .I +folder
191 and
192 .B \-draftmessage
193 .I msg
194 switches invoke the
195 .B nmh
196 draft folder facility.  This is an advanced (and highly
197 useful) feature.  Consult the
198 .BR mh-draft (5)
199 man page for more information.
200 .PP
201 The
202 .B \-editor
203 .I editor
204 switch indicates the editor to use for the
205 initial edit.  Upon exiting from the editor,
206 .B comp
207 will invoke the
208 .B whatnow
209 program.  See
210 .BR whatnow (1)
211 for a discussion of
212 available options.  The invocation of this program can be inhibited
213 by using the
214 .B \-nowhatnowproc
215 switch.  (In truth of fact, it is
216 the
217 .I whatnow
218 program which starts the initial edit.  Hence,
219 .B \-nowhatnowproc
220 will prevent any edit from occurring.)
221
222 .SH FILES
223 .fc ^ ~
224 .nf
225 .ta \w'%etcdir%/ExtraBigFileName  'u
226 ^%etcdir%/components~^The standard message skeleton
227 ^or <mh\-dir>/components~^Rather than the standard skeleton
228 ^$HOME/\&.mh\(ruprofile~^The user profile
229 ^<mh\-dir>/draft~^The draft file
230 .fi
231
232 .SH "PROFILE COMPONENTS"
233 .fc ^ ~
234 .nf
235 .ta 2.4i
236 .ta \w'ExtraBigProfileName  'u
237 ^Path:~^To determine the user's nmh directory
238 ^Draft\-Folder:~^To find the default draft\-folder
239 ^Editor:~^To override the default editor
240 ^Msg\-Protect:~^To set mode when creating a new message (draft)
241 ^fileproc:~^Program to refile the message
242 ^whatnowproc:~^Program to ask the \*(lqWhat now?\*(rq questions
243 .fi
244
245 .SH "SEE ALSO"
246 dist(1), forw(1), repl(1), send(1), whatnow(1), mh-profile(5)
247
248 .SH DEFAULTS
249 .nf
250 .RB ` +folder "' defaults to the current folder"
251 .RB ` msg "' defaults to the current message"
252 .RB ` \-nodraftfolder '
253 .RB ` \-nouse '
254 .fi
255
256 .SH CONTEXT
257 None
258
259 .SH BUGS
260 If
261 .I whatnowproc
262 is
263 .BR whatnow ,
264 then
265 .B comp
266 uses a built\-in
267 .BR whatnow ,
268 it does not actually run the
269 .B whatnow
270 program.
271 Hence, if you define your own
272 .IR whatnowproc ,
273 don't call it
274 .B whatnow
275 since
276 .B comp
277 won't run it.