COMP(1)
β¨ NAME β¨
comp β compose an nmh message π (yes bestie, it's the make a new email one, the manual page name is COMP(1) and we're diving in)
π SYNOPSIS π
comp [-help] [-version] [+folder] [msg] [-form formfile] [-use | -nouse]
[-file file] [-draftfolder +folder] [-draftmessage msg]
[-nodraftfolder] [-editor editor] [-noedit] [-width columns] [-from
address] [-to address] [-cc address] [-fcc +folder] [-subject text]
[-whatnowproc program] [-nowhatnowproc] [-build]
π DESCRIPTION π
okay so comp is literally here to create a new message for you to mail. what it does is copy a message form into the draft you're composing, and then it fires up an editor on that draft. unless you pass -noedit, in which case the initial edit is just... suppressed. not today, editor.
The default message template components will direct comp to construct the message draft like this:
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
--------
Now, if a file named components exists in your nmh directory, that one gets used instead of this form. you can also point at a different forms file with the switch -form formfile. your call, queen π
You may also start comp using the contents of an existing message as the form. supply either a +folder or msg argument and that message becomes the message form. but β and this is important β you may not supply both a -form formfile and a +folder or msg argument. pick a lane, bestie. also the line of dashes (or a blank line) must be left between the header and the body of the message, otherwise it won't be identified properly when it's sent β see send(1). it's giving "structure is everything" π
The switch -use directs comp to continue editing an already started message. so if a comp (or dist, repl, or forw) got terminated without sending the draft, you can edit that draft again via comp -use. no draft left behind, periodt π
The -file file switch says: use the named file as the message draft.
Forms that are selected via the -form switch get processed via the nmh template system β see mh-format(5) for the details. Drafts constructed from another message, or with the -use or -file switches, will not be processed with mh-format(5).
In addition to the standard mh-format(5) escapes, these following component escapes are either new or have an alternate meaning:
fccβstringβ any folders specified with-fcc folderfromβstringβ any addresses specified with-from addresstoβstringβ any addresses specified with-to addressccβstringβ any addresses specified with-cc addresssubjectβstringβ any text specified with-subject text
By default the To: and cc: fields are empty. you can add addresses to these fields with the -to address and -cc address switches. and yes, you may give these switches multiple times to add multiple addresses. collect them all πΈ
By default the From: field has either the value of the Local-Mailbox profile entry or a system default email address. this default can be overridden by using the -from address switch. the default mailbox in the Fcc: field is +outbox. that can be overridden by the -fcc switch. main character energy, honestly π¦
Any text you give to the -subject switch will be placed in the Subject: field in the draft. iconic β¨
If the draft already exists, comp will ask you about the disposition of the draft. and here are your options, bestie:
quitβ will abortcomp, leaving the draft intactreplaceβ will replace the existing draft with the appropriate formlistβ will display the draftuseβ will use the draft for further compositionrefile +folderβ will file the draft in the given folder, and give you a new draft with the appropriate form. (the+folderargument torefileis required, don't forget it π)
The -draftfolder +folder and -draftmessage msg switches invoke the nmh draft folder facility. this is an advanced (and highly useful) feature. go consult mh-draft(5) for more info, iykyk π
The -editor editor switch indicates the editor to use for the initial edit. upon exiting from the editor, comp will invoke the whatnow program (see whatnow(1) for a discussion of the available options). that invocation can be inhibited by using the -nowhatnowproc switch. (in fact, it is the whatnow program which starts the initial edit. hence, -nowhatnowproc will prevent any edit from occurring. wild, i know π)
The -build switch is intended to be used by the Emacs mh-e interface to nmh. it implies -nowhatnowproc. it causes a file <mh-dir>/draft to be created, containing the draft message that would normally be presented to the user for editing. no mail is actually sent. it's just the vibe of a draft π«Ά
π FILES π
/etc/nmh/componentsβ the default message skeleton.<mh-dir>/componentsβ the user's message skeleton.$HOME/.mh_profileβ the user's profile.
π PROFILE COMPONENTS π
Path:β to determine the user's nmh directory.Draft-Folder:β to specify the default draftfolder.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), mh-draft(5), mh-profile(5)
β DEFAULTS β
+folderβ the current folder.msgβ the current message.-nodraftfolder-nouse
π§ CONTEXT π§
None
π BUGS π
If whatnowproc is whatnow, then comp uses a built-in whatnow β it does not actually run the whatnow program. hence, if you define your own whatnowproc, don't call it whatnow since comp won't run it. name it literally anything else, bestie, i'm begging π
and that's the whole page, no cap π this was nmh-1.8, dated 2022-12-22, brought to you by the COMP(1) manual. slay, go compose something iconic β¨π
π¦ where this page comes from
- alpine 3.24: nmh-doc 1.8-r3 Β· BSD-3-Clause
- epel 10: nmh 1.8-3.el10_1 Β· BSD
- epel 9: nmh 1.8-1.el9 Β· BSD
- fedora 43: nmh 1.8-9.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: nmh 1.8-10.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms