The repl command is flexible -- there are a lot of great features that weren't covered in the introduction.
You don't have to reply to everyone who got the original message, and repl -query makes it easy to choose who gets your reply. The -nocc and -cc switches give you another way to choose. This section covers several different ways to include the original message in your reply. The original message can be marked automatically when you reply to it. And there's more.
% repl -queryOr, if you like -query enough to use it most of the time, you can add it to your MH profile -- then, whenever you don't want -query, you can use -noquery on the command line:
% repl -noqueryNow, for a demonstration of -query. First, show part of the message. Then, start repl -query and send copies of the reply only to a couple of people. Compare the addresses in the original message with the header of the reply:
% show last (Message mh-users:8) Date: 13 Nov 89 00:28:18 GMT From: Al Bok <firstname.lastname@example.org> To: email@example.com cc: firstname.lastname@example.org, email@example.com Subject: Query about "repl -query" I have a question about repl -query... ... % repl -query Reply to Al Bok <firstname.lastname@example.org>? y Reply to email@example.com? n Reply to firstname.lastname@example.org? n Reply to email@example.com? y Reply to auser? n To: Al Bok <firstname.lastname@example.org> cc: email@example.com Subject: Re: Query about "repl -query" In-reply-to: Your message of "13 Nov 89 00:28:18 +0000." -------- Al, I think this is the answer. Guru, am I right? ...If you hadn't used -query, your reply would have been addressed to all the original recipients.
(Notice the last query Reply to auser?. This happened because repl will automatically send a copy to you (auser) at your local address if your replcomps file tells it to. Even though auser's complete address (firstname.lastname@example.org) was already in the header, repl couldn't tell the difference, so it asked again. There are ways around these problems besides -query. See the Sections Selective Replies with -nocc and -cc and Defining Alternate Mailboxes.)
If you press your interrupt key (like CTRL-C) while -query is asking for addresses, repl will leave an empty draft message file. If you aren't using a draft folder, you'll get the prompt "Draft exists: disposition?" when you try again; just replace the empty draft. If you use a draft folder, it will fill up with empty drafts; a cron job that runs find -size 0 -name '[1-9]*' in the draft folder can remove those empty files.
% repl -nocc to -nocc ccwould have sent the reply only to Al Bok and you. You might ask: why you? (Let's assume you're auser.) Didn't you use -nocc cc to ignore the cc: field? Yes, but repl always sends a copy to you, by default -- unless, that is, you use the -nocc me switch.
% repl -nocc to -nocc cc -nocc meThat's getting pretty long. Using -nocc all or -cc all lets you exclude or include cc:'s to everyone listed in the original message. You could do the same thing as the command above with:
% repl -nocc all
% repl -nocc all -cc to % repl -cc to -nocc allThe first one works (sends a copy to the To: addresses) because -cc to comes last on the command line and thus undoes part of the -nocc all.
repl: -nocc cc -nocc meThen, for example, you can use the -cc switch when you want to include one of the header fields (overriding the -nocc switches in your MH profile):
% repl -cc cc
For more information, see the Section The replcomps File.
One way to do that is by editing your reply with a text editor like vi which can read other files. repl lets you read the original message file through a link named @ (at sign). (On systems that use an at sign (@) as the line-delete character, type \@.) For example, with vi, just move to the bottom of the draft reply and type:
:read @If it doesn't work, check to see whether you started repl from a read-only directory or if your current directory is on a different filesystem than the original message. In those cases, UNIX can't make a link to the original message. This Section has an alias for repl that pops you back to the filesystem where the links can be made. Also, many versions of Emacs change their current directory to the directory where the draft is; if your editor does that, reading @ will be a pain.
Depending on your editor, you may also be able to read the original message by using the editalt environment variable. In vi, for instance, type:
:read $editaltIf neither of those works, the mhpath command can find the pathname for you. For example, you can always read the original message by typing the command in backquotes (`). For example, in vi, enter:
:read `mhpath cur`The Section Shell Command Substitution covers backquoting. You'll also want to know about The mhpath Command.
Another way to add the original message is with a program like append -- you use it at the What now? prompt.
Finally, the Section Including the Original Message with -filter has what might be the best way of all.
This isn't the place to explain mhl in depth. If you're interested, look at Section mhl. Otherwise, here's some "cookbook" help.
For instance, to make a filter file that includes the original message in your reply, indented by eight characters, put the following two lines into a file named something like replfilt (the exact name doesn't matter) in your MH Mail directory:
: body:nocomponent,compwidth=9,offset=9Be sure that there's no space between body: and nocomponent. Then, reply to the message this way (use the original message number and other switches, as well, if you need to):
% repl -filter replfiltA lot of people like to include the original message with the right angle bracket (>) and a space before every line of the original, like this:
% repl -filter replfilt To: Al Bok <email@example.com> cc: firstname.lastname@example.org Subject: Re: Query about "repl -query" In-reply-to: Your message of "13 Nov 89 00:28:18 +0000." -------- > I have a question about repl -query. > Why does it ask twice if I want a copy of my reply? Al, that's because repl automatically sends a copy ...To do that, make your replfilt file look like this:
body:component="> ",compwidth=0Note that the right angle bracket has a space (blank) after it (> ). The blank(s) are optional; depending on how you want the original message indented, you can use no, one, or several blanks. Also note that some earlier versions of MH would either put the right angle bracket (>) only before the first line of the included reply or insert a > in the middle of some lines of text. If your version of MH does either of these, you'll need a newer version of MH, such as MH 6.7.
You can make that the default by adding -filter replfilt to a repl: entry in your MH profile. There's a problem with adding that entry to your MH profile, though: after you do that, it will be hard to reply to a message without that replfilt formatting. (repl doesn't have a -nofilter switch.) The Section Versions of repl shows some ways to make all of this easier. For instance, you can fix your own mail environment so that you can type replx to use your filter file or repl to reply without including the original message. To add text to the end of each reply, see the Section Automatic Signature on End of Messages.
Replied: Mon, 09 Jan 1995 18:28:46 -0500 Replied: Al Bok <email@example.com> Replied: firstname.lastname@example.orgThis lets you know that you've sent a reply -- a useful feature for busy or absent-minded people.
By default, scan looks for these Replied: fields in messages. It marks these messages with a dash (-) in the listing. For example, here are two messages; you've replied to the second one:
5 01/09 Al Bok The next project...<<...is going to be 11 -01/10 Donna Lewis About the next project...<<Al, I'm won
% repl 86 Reply to "Emma H. User" <email@example.com>? y From: Jerry Peek <firstname.lastname@example.org> X-Mailer: MH 6.8.3 To: "Emma H. User" <email@example.com> Fcc: inbox Subject: Re: Reviewers needed for book chapters about MIME under MH In-reply-to: Message from "Emma H. User" <firstname.lastname@example.org> of "Mon, 09 Jan 1995 12:22:47 -0800." <1995Jan09.email@example.com> -------- #forw #<text/enriched [my reply] Emma, it would be <bold>great</bold> if you have time to ...omitted... #text/x-sgml [X User Tools article] /u/jerry/mh-book/xpt_article/2021.sgm #image/x-xwd [overall view] /u/jerry/mh-book/xpt_article/exmh.allwin.xwd #image/x-xwd [folders] /u/jerry/mh-book/xpt_article/exmh.folders.xwd #text/plain [Xhibition article] /u/jerry/mh-book/exmh.Xhibition/article CTRL-D -------- What now? e mhn What now? e vi ...edit first part (original message excerpt)... What now? p %Unfortunately, that method doesn't let you select one part of a multipart message. It also doesn't undo quoted-printable or base64 encodings so that you can include (and edit) the original message text. One workaround is to use the mimecat script to pull in the original draft, unencoded. For instance, to read part 2 of the original (current) message into your draft, add an appropriate directive:
#text/plain [your message] |mimecat -part 2If you want to edit the included text, use a #< directive instead:
#<text/plain [your message]Then, as you're editing the draft, read in the original message part. For example, to read message 23 from the mimecat output with vi:
:r !mimecat 23As I write this, I hadn't found a replacement for repl that automates the job. If you hear of something good, please send me email. I'll update the archive and the book.
[Table of Contents] [Index] [Previous: The comp Command] [Next: Forwarding Messages with forw]
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 <firstname.lastname@example.org>