1COMP(1) General Commands Manual COMP(1)
2
3
4
6 comp - compose an nmh message
7
9 comp [-help] [-version] [+folder] [msg] [-form formfile] [-use |
10 -nouse] [-file file] [-draftfolder +folder] [-draftmessage msg]
11 [-nodraftfolder] [-editor editor] [-noedit] [-width columns]
12 [-from address] [-to address] [-cc address] [-fcc +folder] [-sub‐
13 ject text] [-whatnowproc program] [-nowhatnowproc] [-build]
14
16 comp is used to create a new message to be mailed. It copies a message
17 form to the draft being composed and then invokes an editor on the
18 draft (unless -noedit is given, in which case the initial edit is sup‐
19 pressed).
20
21 The default message template “components” will direct comp to construct
22 the message draft as follows:
23
24 From: {from switch} or <Local-Mailbox> or <username@hostname>
25 To: {to switch} or blank
26 cc: {cc switch} or blank
27 Fcc: {fcc switch} or +outbox
28 Subject: {subject switch} or blank
29 --------
30
31 If a file named “components” exists in the user's nmh directory, it
32 will be used instead of this form. You may specify an alternate forms
33 file with the switch -form formfile.
34
35 You may also start comp using the contents of an existing message as
36 the form. If you supply either a +folder or msg argument, that message
37 will be used as the message form. You may not supply both a -form
38 formfile and a +folder or msg argument. The line of dashes or a blank
39 line must be left between the header and the body of the message for
40 the message to be identified properly when it is sent (see send(1)).
41
42 The switch -use directs comp to continue editing an already started
43 message. That is, if a comp (or dist, repl, or forw) is terminated
44 without sending the draft, the draft can be edited again via “comp
45 -use”.
46
47 The -file file switch says to use the named file as the message draft.
48
49 Forms that are selected via the -form switch are processed via the nmh
50 template system; see mh-format(5) for details. Drafts constructed from
51 another message or with the -use or -file switches will not be pro‐
52 cessed with mh-format(5).
53
54 In addition to the standard mh-format(5) escapes, the following compo‐
55 nent escapes are either new or have an alternate meaning:
56
57 Escape Returns Description
58 fcc string Any folders specified with `-fcc folder'
59 from string Any addresses specified with `-from address'
60 to string Any addresses specified with `-to address'
61 cc string Any addresses specified with `-cc address'
62 subject string Any text specified with `-subject text'
63
64 By default the “To:” and “cc:” fields are empty. You may add addresses
65 to these fields with the -to address and -cc address switches. You may
66 give these switches multiple times to add multiple addresses.
67
68 By default the “From:” field has either the value of the Local-Mailbox
69 profile entry or a system default email address. This default can be
70 overridden by using the -from address switch. The default mailbox in
71 the “Fcc:” field is +outbox. This can be overridden by the -fcc
72 switch.
73
74 Any text you give to the -subject switch will be placed in the “Sub‐
75 ject:” field in the draft.
76
77 If the draft already exists, comp will ask you as to the disposition of
78 the draft. A reply of quit will abort comp, leaving the draft intact;
79 replace will replace the existing draft with the appropriate form; list
80 will display the draft; use will use the draft for further composition;
81 and refile +folder will file the draft in the given folder, and give
82 you a new draft with the appropriate form. (The +folder argument to
83 refile is required.)
84
85 The -draftfolder +folder and -draftmessage msg switches invoke the nmh
86 draft folder facility. This is an advanced (and highly useful) fea‐
87 ture. Consult the mh-draft(5) man page for more information.
88
89 The -editor editor switch indicates the editor to use for the initial
90 edit. Upon exiting from the editor, comp will invoke the whatnow pro‐
91 gram (see whatnow(1) for a discussion of available options). The invo‐
92 cation of this program can be inhibited by using the -nowhatnowproc
93 switch. (In fact, it is the whatnow program which starts the initial
94 edit. Hence, -nowhatnowproc will prevent any edit from occurring.)
95
96 The -build switch is intended to be used by the Emacs mh-e interface to
97 nmh. It implies -nowhatnowproc. It causes a file <mh-dir>/draft to be
98 created, containing the draft message that would normally be presented
99 to the user for editing. No mail is actually sent.
100
102 /etc/nmh/components The default message skeleton.
103 <mh-dir>/components The user's message skeleton.
104 $HOME/.mh_profile The user's profile.
105
107 Path: To determine the user's nmh directory.
108 Draft-Folder: To find the default draft-folder.
109 Editor: To override the default editor.
110 Msg-Protect: To set mode when creating a new message (draft).
111 fileproc: Program to refile the message.
112 whatnowproc: Program to ask the “What now?” questions
113
115 dist(1), forw(1), repl(1), send(1), whatnow(1), mh-profile(5)
116
118 +folder The current folder.
119 msg The current message.
120 -nodraftfolder
121 -nouse
122
124 None
125
127 If whatnowproc is whatnow, then comp uses a built-in whatnow, it does
128 not actually run the whatnow program. Hence, if you define your own
129 whatnowproc, don't call it whatnow since comp won't run it.
130
131
132
133nmh-1.7.1 2013-10-18 COMP(1)