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