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 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

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 abort comp, 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
  • 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, 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