Beginning support for mh-format support in comp(1). Includes changes to
[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 [ \-whatnowproc
27 .IR program ]
28 .RB [ \-nowhatnowproc ]
29 .RB [ \-version ]
30 .RB [ \-help ]
31 .ad
32 .SH DESCRIPTION
33 .B Comp
34 is used to create a new message to be mailed.  It copies a
35 message form to the draft being composed and then invokes an editor on
36 the draft (unless
37 .B \-noedit
38 is given, in which case the initial edit is suppressed).
39 .PP
40 The default message form contains the following elements:
41 .PP
42 .RS 5
43 .nf
44 %components%
45 .fi
46 .RE
47 .PP
48 If a file named
49 .RI \*(lq components \*(rq
50 exists in the user's nmh directory,
51 it will be used instead of this form.  You may specify an alternate
52 forms file with the switch
53 .B \-form
54 .IR formfile .
55 .PP
56 You may also start
57 .B comp
58 using the contents of an existing message
59 as the form.  If you supply either a
60 .I +folder
61 or
62 .I msg
63 argument, that
64 message will be used as the message form.  You may not supply both a
65 .B \-form
66 .I formfile
67 and a
68 .I +folder
69 or
70 .I msg
71 argument.  The line of
72 dashes or a blank line must be left between the header and the body of
73 the message for the message to be identified properly when it is sent
74 (see
75 .BR send (1)).
76 .PP
77 The switch
78 .B \-use
79 directs
80 .B comp
81 to continue editing an already
82 started message.  That is, if a
83 .B comp
84 (or
85 .BR dist ,
86 .BR repl ,
87 or
88 .BR forw )
89 is terminated without sending the draft, the draft can
90 be edited again via
91 .RB \*(lq comp
92 .BR \-use \*(rq.
93 .PP
94 The
95 .B \-file
96 .I file
97 switch says to use the named file as the message draft.
98 .PP
99 Forms that are selected via the
100 .B \-form
101 switch are processed via the mh template system; see 
102 .BR mh\-format (5)
103 for details.  Drafts constructed from another mssage or with the
104 .B \-use
105 or
106 .B \-file
107 switchs will NOT be processed with
108 .BR mh\-format (5).
109 .PP
110 If the draft already exists,
111 .B comp
112 will ask you as to the disposition
113 of the draft.  A reply of
114 .B quit
115 will abort
116 .BR comp ,
117 leaving the draft intact;
118 .B replace
119 will replace the existing draft with
120 the appropriate form;
121 .B list
122 will display the draft;
123 .B use
124 will use the draft for further composition; and
125 .B refile
126 .I +folder
127 will file the draft in the given folder, and give you a new draft with the
128 appropriate form.  (The
129 .I +folder
130 argument to
131 .B refile
132 is required.)
133 .PP
134 The
135 .B \-draftfolder
136 .I +folder
137 and
138 .B \-draftmessage
139 .I msg
140 switches invoke the
141 .B nmh
142 draft folder facility.  This is an advanced (and highly
143 useful) feature.  Consult the
144 .BR mh-draft (5)
145 man page for more information.
146 .PP
147 The
148 .B \-editor
149 .I editor
150 switch indicates the editor to use for the
151 initial edit.  Upon exiting from the editor,
152 .B comp
153 will invoke the
154 .B whatnow
155 program.  See
156 .BR whatnow (1)
157 for a discussion of
158 available options.  The invocation of this program can be inhibited
159 by using the
160 .B \-nowhatnowproc
161 switch.  (In truth of fact, it is
162 the
163 .I whatnow
164 program which starts the initial edit.  Hence,
165 .B \-nowhatnowproc
166 will prevent any edit from occurring.)
167
168 .SH FILES
169 .fc ^ ~
170 .nf
171 .ta \w'%etcdir%/ExtraBigFileName  'u
172 ^%etcdir%/components~^The standard message skeleton
173 ^or <mh\-dir>/components~^Rather than the standard skeleton
174 ^$HOME/\&.mh\(ruprofile~^The user profile
175 ^<mh\-dir>/draft~^The draft file
176 .fi
177
178 .SH "PROFILE COMPONENTS"
179 .fc ^ ~
180 .nf
181 .ta 2.4i
182 .ta \w'ExtraBigProfileName  'u
183 ^Path:~^To determine the user's nmh directory
184 ^Draft\-Folder:~^To find the default draft\-folder
185 ^Editor:~^To override the default editor
186 ^Msg\-Protect:~^To set mode when creating a new message (draft)
187 ^fileproc:~^Program to refile the message
188 ^whatnowproc:~^Program to ask the \*(lqWhat now?\*(rq questions
189 .fi
190
191 .SH "SEE ALSO"
192 dist(1), forw(1), repl(1), send(1), whatnow(1), mh-profile(5)
193
194 .SH DEFAULTS
195 .nf
196 .RB ` +folder "' defaults to the current folder"
197 .RB ` msg "' defaults to the current message"
198 .RB ` \-nodraftfolder '
199 .RB ` \-nouse '
200 .fi
201
202 .SH CONTEXT
203 None
204
205 .SH BUGS
206 If
207 .I whatnowproc
208 is
209 .BR whatnow ,
210 then
211 .B comp
212 uses a built\-in
213 .BR whatnow ,
214 it does not actually run the
215 .B whatnow
216 program.
217 Hence, if you define your own
218 .IR whatnowproc ,
219 don't call it
220 .B whatnow
221 since
222 .B comp
223 won't run it.