Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dist(1mh)

forw(1mh)

prompter(1mh)

repl(1mh)

send(1mh)

whatnow(1mh)

mh-profile(5mh)

comp(1mh)

NAME

comp − compose a message

SYNTAX

comp [+folder] [msg] [−draftfolder +folder] [−draftmessage msg] [−nodraftfolder] [−editor editorname] [−noedit] [−file filename] [−form formfile] [−use] [−nouse] [−whatnowproc program] [−nowhatnowproc] [−help]

DESCRIPTION

Use comp to create a new message for mailing.  When you run comp, it provides a message template for you to fill in and invokes an editor so that you can complete the message.

A mail message consists of a mail header and the body of the message.  The mail header contains all the information that determines who is going to receive the mail message.  It can also give the recipients some information about the sender.  The body of the message is the actual text of the message that you want to send.  The header is separated from the body of the text by a blank line or by a line of dashes.  The header must be separated from the body of the message in this way for the message to be identified properly when it is sent (see send().)).

The standard message header contains the following elements:

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

OPTIONS

You can specify an alternative mail header by setting up a file called components in your MH directory.  This is used instead of the default mail header by MH. You can also direct comp to use an alternative header by using the −form  formfile option. 

comp normally invokes an editor, unless you have used the −noedit flag.  The default editor is prompter, which is a very rudimentary editor (see prompter().)). You can specify your own choice of editor using the −editor editorname option.  If you regularly use the same editor you can specify it by specifying it in the editor: line of your mh-profile. The following example shows how to set up vi as the editor you’ll use to compose mail messages.

editor: /usr/ucb/vi

You can direct comp to use an existing message by specifying a folder or a msg argument.  You can not supply both a −form formfile and a +folder or a msg argument. 

If you supply a +folder argument, comp will use the current message in the specified folder as the draft for your message. If you specify a message number as an argument and you do not have a drafts folder set up, comp will use that message from the current folder.  If you do have a drafts folder set up, comp will use the specified message from your drafts folder.  This is similar to specifying comp−use, except that comp−use will only take messages from the draft or drafts folders.  The draft file or drafts folder are used by the comp, dist, repl, and forw commands.  If any of these commands are terminated without sending the draft, you can edit the draft again by using comp −use. 

If the draft already exists, comp will ask you what you want to do with the draft.  The available options are:

quit aborts comp leaving the draft intact
replace replaces the existing draft with the appropriate message form
use allows you to edit the existing draft
list displays the draft message
refile refiles the existing draft message in the specified folder
and provides a new message form for you to complete

You have to specify a +foldername when you specify refile. If you use quit−d you will exit from the editor and delete the draft message. The +foldername argument to refile is required.

The −draftfolder +folder and −draftmessage msg switches invoke the MH draft folder facility.  The −draftfolder +foldername switch lets you specify the folder that an unsent draft will be stored in.  The −draftmessage msg switch lets you create a message with a meaningful name.  If you quit without sending a message, that message will be stored, as a file with the specified name, in your Mail directory.  You can use dist, forw, and send to access the specified draft file.

The −file filename switch makes comp use the named file as the message draft.

When you exit from the editor, comp invokes the whatnow program. See whatnow() for a discussion of available options.  You can also specify your own whatnow process using the −whatnowproc program.  If you do specify your own whatnow program, you should not call it whatnow. You can suppress the whatnow program entirely by using the −nowhatnowproc switch.  However, as the whatnow program normally starts the initial edit, −nowhatnowproc will prevent you from editing the message.

The defaults for comp are:

+foldername defaults to the current folder
msg defaults to the current message
−nodraftfolder
−nouse

FILES

/usr/new/lib/mh/components The message skeleton
<mh−dir>/components Alternative to the standard skeleton
$HOME/.mh_profile Your user profile
<mh−dir>/draft The draft file

PROFILE COMPONENTS

Path: To determine your 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(1mh), forw(1mh), prompter(1mh), repl(1mh), send(1mh), whatnow(1mh), mh-profile(5mh)

Commands

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026