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