bfb78b3c8b6d45e6993b548fb814812e14925c5f
[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 If the draft already exists,
100 .B comp
101 will ask you as to the disposition
102 of the draft.  A reply of
103 .B quit
104 will abort
105 .BR comp ,
106 leaving the draft intact;
107 .B replace
108 will replace the existing draft with
109 the appropriate form;
110 .B list
111 will display the draft;
112 .B use
113 will use the draft for further composition; and
114 .B refile
115 .I +folder
116 will file the draft in the given folder, and give you a new draft with the
117 appropriate form.  (The
118 .I +folder
119 argument to
120 .B refile
121 is required.)
122 .PP
123 The
124 .B \-draftfolder
125 .I +folder
126 and
127 .B \-draftmessage
128 .I msg
129 switches invoke the
130 .B nmh
131 draft folder facility.  This is an advanced (and highly
132 useful) feature.  Consult the
133 .BR mh-draft (5)
134 man page for more information.
135 .PP
136 The
137 .B \-editor
138 .I editor
139 switch indicates the editor to use for the
140 initial edit.  Upon exiting from the editor,
141 .B comp
142 will invoke the
143 .B whatnow
144 program.  See
145 .BR whatnow (1)
146 for a discussion of
147 available options.  The invocation of this program can be inhibited
148 by using the
149 .B \-nowhatnowproc
150 switch.  (In truth of fact, it is
151 the
152 .I whatnow
153 program which starts the initial edit.  Hence,
154 .B \-nowhatnowproc
155 will prevent any edit from occurring.)
156
157 .SH FILES
158 .fc ^ ~
159 .nf
160 .ta \w'%etcdir%/ExtraBigFileName  'u
161 ^%etcdir%/components~^The standard message skeleton
162 ^or <mh\-dir>/components~^Rather than the standard skeleton
163 ^$HOME/\&.mh\(ruprofile~^The user profile
164 ^<mh\-dir>/draft~^The draft file
165 .fi
166
167 .SH "PROFILE COMPONENTS"
168 .fc ^ ~
169 .nf
170 .ta 2.4i
171 .ta \w'ExtraBigProfileName  'u
172 ^Path:~^To determine the user's nmh directory
173 ^Draft\-Folder:~^To find the default draft\-folder
174 ^Editor:~^To override the default editor
175 ^Msg\-Protect:~^To set mode when creating a new message (draft)
176 ^fileproc:~^Program to refile the message
177 ^whatnowproc:~^Program to ask the \*(lqWhat now?\*(rq questions
178 .fi
179
180 .SH "SEE ALSO"
181 dist(1), forw(1), repl(1), send(1), whatnow(1), mh-profile(5)
182
183 .SH DEFAULTS
184 .nf
185 .RB ` +folder "' defaults to the current folder"
186 .RB ` msg "' defaults to the current message"
187 .RB ` \-nodraftfolder '
188 .RB ` \-nouse '
189 .fi
190
191 .SH CONTEXT
192 None
193
194 .SH BUGS
195 If
196 .I whatnowproc
197 is
198 .BR whatnow ,
199 then
200 .B comp
201 uses a built\-in
202 .BR whatnow ,
203 it does not actually run the
204 .B whatnow
205 program.
206 Hence, if you define your own
207 .IR whatnowproc ,
208 don't call it
209 .B whatnow
210 since
211 .B comp
212 won't run it.