Replying to Messages: repl

[previous] [next] [table of contents] [index]

To answer a message, you could use comp and fill in the To:, cc:, and Subject: fields yourself. But MH has a command for sending replies that fills in the header automatically.

To start, pick a message that you want to reply to. If it's the message you just read (with show, next, or prev) you can reply to it by typing:

% repl
without the message number. That's because it's the current message and, as with most MH commands, if you don't type a message number, the current message is used. If you want to reply to a message besides the current one, type a space and the message number -- for example, to reply to message 1, type:
% repl 1
Take a look back at message 1. Compare its heading to the heading you get when you reply to it:
% repl 1
To: "Joe Doe" <joed>
cc: angelac
Subject: Re: Here's the first message you asked for
In-reply-to: Your message of "Mon, 09 Jan 1995 16:56:37 -0600."
	<9501092156.AA08581@mysun.xyz.edu>
-------
MH automatically addressed the reply with a cc: to you. It used the original Subject: field with Re: in front of it. Finally, it added a two-line In-reply-to: field that shows when the original message was sent and its Message-Id. (Of course, this can all be changed. See the Section Replying to Mail with repl.)

From here on, repl works the same as comp. The cursor sits under the row of dashed lines. You can type the body of the reply here. Remember to press RETURN at the end of each line. When you're done with the body of the reply, you should press CTRL-D at the start of a new line to get the What now? prompt.

Now, instead of sending the reply, look at it on your screen by typing list and pressing RETURN at the What now? prompt:

What now? list

To: "Joe Doe" <joed>
cc: angelac
   ...

What now?
After the message has been shown, you'll get another What now? prompt.

You've got lots of choices here; the Section What now? -- and the whatnow Program explains them all. For now, though, if you want to edit the draft reply (and if you know how to use a UNIX text editor -- such as vi) -- you can. Just type edit followed by the name of your favorite editor, like this:

What now? edit vi
When you press RETURN, MH will start the editor on the draft message. You can change anything you want -- fix spelling, neaten the lines, add or delete words, read a copy of a file from your directory, whatever. You can even change the message header (addresses and so on) -- but be sure not to put any blank lines in the header or add any nonstandard fields besides To:, Subject:, etc., unless you know what you're doing with mail headers. Also, don't delete the row of dashes between the header and body.

When you're done editing, save your changes and exit the editor (in vi, for example, type ZZ).

You'll be back at the What now? prompt. Go ahead and send your reply. If there were problems with the message, MH will show error messages and give another What now? prompt. If everything's fine, though, you'll get a shell prompt (%).

[Table of Contents] [Index] [Previous: Reading Mail: inc, show, next, prev] [Next: Command-line Switches (Options)]


Last change $Date: 1996/06/06 15:13:25 $

This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely-available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.

Suggestions are welcome: Jerry Peek <jpeek@jpeek.com>