4.3BSD-UWisc/man/catl/comp.l




COMP(1)             UNIX Programmer's Manual              COMP(1)



NAME
     comp - compose a message

SYNOPSIS
     comp [+folder] [msg] [-draftfolder +folder]
          [-draftmessage msg] [-nodraftfolder] [-editor editor]
          [-noedit] [-file file] [-form formfile] [-use] [-nouse]
          [-whatnowproc program] [-nowhatnowproc] [-help]
9     _C_o_m_p 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 `-noedit' is given,
     in which case the initial edit is suppressed).

     The default message form contains the following elements:

          To:
          cc:
          Subject:
          --------

     If the file named "components" exists in the user's MH
     directory, it will be used instead of this form.  The file
     specified by `-form formfile' will be used if given.  You
     may also start _c_o_m_p using the contents of an existing mes-
     sage as the form.  If you supply either a `+folder' or `msg'
     argument, that message will be used as the form.  You may
     not supply both a `-form formfile' and a `+folder' or `msg'
     argument.  The line of dashes or a blank line must be left
     between the header and the body of the message for the mes-
     sage to be identified properly when it is sent (see
     _s_e_n_d (1)).  The switch `-use' directs _c_o_m_p to continue edit-
     ing an already started message.  That is, if a _c_o_m_p (or
     _d_i_s_t, _r_e_p_l, or _f_o_r_w ) is terminated without sending the
     draft, the draft can be edited again via "comp -use".

     If the draft already exists, _c_o_m_p will ask you as to the
     disposition of the draft.  A reply of quit will abort _c_o_m_p,
     leaving the draft intact; replace will replace the existing
     draft with the appropriate form; list will display the
     draft; use will use the draft for further composition; and
     refile +folder will file the draft in the given folder, and
     give you a new draft with the appropriate form.  (The
     `+folder' argument to refile is required.)

     The `-draftfolder +folder' and `-draftmessage msg' switches
     invoke the _M_H draft folder facility.  This is an advanced
     (and highly useful) feature.  Consult the Advanced Features
     section of the _M_H manual for more information.

     The `-file file' switch says to use the named file as the
     message draft.
9


Printed 1/10/87                MH                               1






COMP(1)             UNIX Programmer's Manual              COMP(1)



     Upon exiting from the editor, _c_o_m_p will invoke the _w_h_a_t_n_o_w
     program.  See _w_h_a_t_n_o_w (1) for a discussion of available
     options.  The invocation of this program can be inhibited by
     using the `-nowhatnowproc' switch.  (In truth of fact, it is
     the _w_h_a_t_n_o_w program which starts the initial edit.  Hence,
     `-nowhatnowproc' will prevent any edit from occurring.)

FILES
     /usr/misc/mh/lib/components        The message skeleton
     or <mh-dir>/components             Rather than the standard skeleton
     $HOME/.mh_profile                  The user profile
     <mh-dir>/draft                     The draft file

PROFILE COMPONENTS
     Path:                To determine the user's MH directory
     Draft-Folder:        To find the default draft-folder
     Editor:              To override the default editor
     Msg-Protect:         To set mode when creating a new message (draft)
     fileproc:            Program to refile the message
     whatnowproc:         Program to ask the "What now?" questions

SEE ALSO
     dist(1), forw(1), repl(1), send(1), whatnow(1)

DEFAULTS
     `+folder' defaults to the current folder
     `msg' defaults to the current message
     `-nodraftfolder'
     `-nouse'

CONTEXT
     None

BUGS
     If _w_h_a_t_n_o_w_p_r_o_c is _w_h_a_t_n_o_w, then _c_o_m_p uses a built-in _w_h_a_t_-
     _n_o_w, it does not actually run the _w_h_a_t_n_o_w program.  Hence,
     if you define your own _w_h_a_t_n_o_w_p_r_o_c, don't call it _w_h_a_t_n_o_w
     since _c_o_m_p won't run it.

















Printed 1/10/87                MH                               2