whatnow cooks up strings for executing external commands, and then
[mmh] / man / comp.man
index 610e93b..f771604 100644 (file)
@@ -1,15 +1,15 @@
 .\"
 .\" %nmhwarning%
-.\" $Id$
 .\"
 .TH COMP %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
 .SH NAME
 comp \- compose a message
 .SH SYNOPSIS
 .HP 5
+.na
 .B comp 
 .RI [ +folder ]
-.RI [ msgs ]
+.RI [ msg ]
 .RB [ \-form
 .IR formfile ]
 .RB [ \-use " | " \-nouse ]
@@ -23,25 +23,44 @@ comp \- compose a message
 .RB [ \-editor
 .IR editor ]
 .RB [ \-noedit ]
+.RB [ \-width
+.IR columns ]
+.RB [ \-from
+.IR address ]
+.RB [ \-to
+.IR address ]
+.RB [ \-cc
+.IR address ]
+.RB [ \-fcc
+.IR +folder ]
+.RB [ \-subject
+.IR text ]
 .RB [ \-whatnowproc
 .IR program ]
 .RB [ \-nowhatnowproc ]
 .RB [ \-version ]
 .RB [ \-help ]
+.ad
 .SH DESCRIPTION
 .B Comp
 is used to create a new message to be mailed.  It copies a
 message form to the draft being composed and then invokes an editor on
 the draft (unless
 .B \-noedit
-is given, in which case the initial edit
-is suppressed).
+is given, in which case the initial edit is suppressed).
 .PP
-The default message form contains the following elements:
+The default message template \*(lqcomponents\*(rq will direct
+.B comp
+to construct the message draft as follows:
 .PP
 .RS 5
 .nf
-%components%
+From: {from switch} or <Local-Mailbox> or <username@hostname>
+To: {to switch} or blank
+cc: {cc switch} or blank
+Fcc: {fcc switch} or +outbox
+Subject: {subject switch} or blank
+--------
 .fi
 .RE
 .PP
@@ -96,6 +115,64 @@ The
 .I file
 switch says to use the named file as the message draft.
 .PP
+Forms that are selected via the
+.B \-form
+switch are processed via the
+.B nmh
+template system; see 
+.BR mh\-format (5)
+for details.  Drafts constructed from another message or with the
+.B \-use
+or
+.B \-file
+switchs will NOT be processed with
+.BR mh\-format (5).
+.PP
+In addition to the standard
+.BR mh\-format (5)
+escapes,
+the following
+.I component
+escapes are either new or have an alternate meaning:
+.PP
+.RS 5
+.nf
+.ta \w'Escape  'u +\w'Returns  'u
+.I "Escape     Returns Description"
+fcc    string  Any folders specified with `\-fcc\ folder'
+from   string  Any addresses specified with `\-from\ address'
+to     string  Any addresses specified with `\-to\ address'
+cc     string  Any addresses specified with `\-cc\ address'
+subject        string  Any text specified with `\-subject\ text'
+.fi
+.RE
+.PP
+By default the \*(lqTo:\*(rq and \*(lqcc:\*(rq fields are empty.  You may
+add addresses to these fields with the
+.B \-to
+.I address
+and
+.B \-cc
+.I address
+switches.  You may give these switches multiple times to add multiple
+addresses.
+.PP
+By default the \*(lqFrom:\*(rq field has either the value of the
+.B Local\-Mailbox
+profile entry or a system default email address.  This default can be
+overridden by using the
+.B \-from
+.I address
+switch.  The default mailbox in the \*(lqFcc:\*(rq field is
+.IR +outbox .
+This can be overridden by the
+.B \-fcc
+switch.
+.PP
+Any text you give to the
+.B \-subject
+switch will be placed in the \*(lqSubject:\*(rq field in the draft.
+.PP
 If the draft already exists,
 .B comp
 will ask you as to the disposition
@@ -157,11 +234,12 @@ will prevent any edit from occurring.)
 .SH FILES
 .fc ^ ~
 .nf
-.ta \w'/usr/local/nmh/etc/ExtraBigFileName  'u
+.ta \w'%etcdir%/ExtraBigFileName  'u
 ^%etcdir%/components~^The standard message skeleton
 ^or <mh\-dir>/components~^Rather than the standard skeleton
 ^$HOME/\&.mh\(ruprofile~^The user profile
 ^<mh\-dir>/draft~^The draft file
+.fi
 
 .SH "PROFILE COMPONENTS"
 .fc ^ ~
@@ -174,16 +252,18 @@ will prevent any edit from occurring.)
 ^Msg\-Protect:~^To set mode when creating a new message (draft)
 ^fileproc:~^Program to refile the message
 ^whatnowproc:~^Program to ask the \*(lqWhat now?\*(rq questions
+.fi
 
 .SH "SEE ALSO"
 dist(1), forw(1), repl(1), send(1), whatnow(1), mh-profile(5)
 
-.SH "DEFAULTS"
+.SH DEFAULTS
 .nf
 .RB ` +folder "' defaults to the current folder"
 .RB ` msg "' defaults to the current message"
 .RB ` \-nodraftfolder '
 .RB ` \-nouse '
+.fi
 
 .SH CONTEXT
 None