[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

Single Page

Top Document: MH Frequently Asked Questions (FAQ) with Answers
Previous Document: 05.14 What is the Dcc header?
Next Document: 05.16 How can I convert quoted-printable to 8bit in quoted text in replies?


05.15 How can I make sense of the replcomps file?


Date: Thu, 9 Mar 2006 19:27:14 -0800

  The best thing to do is curl up with the mh-format(5) man page, or
  Section 11.2 of the MH book, or the URL:

    http://rand-mh.sourceforge.net/book/mh/mhstr.html

  These will explain the default replcomps file, included here. Don't
  start with the first four lines--the latter group of lines are much
  easier to understand.

    %; $Header: /cvsroot/nmh/nmh/etc/replcomps,v 1.3.2.1 2003/10/24 20:14:46 kenh Exp $
    %;
    %; These next lines slurp in lots of addresses for To: and cc:.
    %; Use with repl -query or else you may get flooded with addresses!
    %;
    %; If no To:/cc:/Fcc: text, we output empty fields for prompter to fill in.
    %;
    %(lit)%(formataddr{reply-to})\
    %(formataddr %<{from}%(void{from})%|%(void{apparently-from})%>)\
    %(formataddr{resent-to})\
    %(formataddr{prev-resent-to})\
    %(formataddr{x-to})\
    %(formataddr{apparently-to})\
    %(void(width))%(putaddr To: )
    %(lit)%(formataddr{to})\
    %(formataddr{cc})\
    %(formataddr{x-cc})\
    %(formataddr{resent-cc})\
    %(formataddr{prev-resent-cc})\
    %(formataddr(me))\
    %(void(width))%(putaddr cc: )
    Fcc: %<{fcc}%{fcc}%|+outbox%>
    Subject: %<{subject}Re: %{subject}%>
    %;
    %; Make References: and In-reply-to: fields for threading.
    %; Use (void), (trim) and (putstr) to eat trailing whitespace.
    %;
    %<{message-id}In-reply-to: %{message-id}\n%>\
    %<{message-id}References: \
    %<{references}%(void{references})%(trim)%(putstr) %>\
    %(void{message-id})%(trim)%(putstr)\n%>\
    Comments: In-reply-to \
    %<{from}%(void{from})%?(void{apparently-from})%|%(void{sender})%>\
    %(trim)%(putstr)\n\
       message dated "%<(nodate{date})%{date}%|%(tws{date})%>."
    --------

  In particular, note the following:

    \   consider the following line to be part of the current line. If
	this continuation character is absent, a newline (\n) will
	always be inserted. Note that if the field is conditional, and
	the condition is false, and there isn't a trailing backslash,
	then a blank line will appear in your reply. Since the rest of
	the header will now be considered to be part of the body, this
	is probably not what you want.
    \n  inject an actual newline into the reply. Note that inserting a
	field without a trailing backslash (\) will cause that field
	to be emitted in the reply as well.
    %<{field}, %?{field}, %|, %>
        if field exists, else if field exists, else, endif.
	Conditional fields nearly always contain an explicit newline
	(\n) and end with a continuation character (\).
    %(command)	mh-format commands
    %{field}	value of the header field inserted at this point

  To add new fields, you can either add fields based on whether
  certain fields exist in the original message (e.g.,
  %<{message-id}...), or hard-code them, as in the Fcc, Subject, or
  Comments fields above.



Top Document: MH Frequently Asked Questions (FAQ) with Answers
Previous Document: 05.14 What is the Dcc header?
Next Document: 05.16 How can I convert quoted-printable to 8bit in quoted text in replies?

Single Page


[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
Bill Wohler <wohler@newt.com>

Last Update October 22 2009 @ 05:26 AM

Some parts © 2009 Advameg, Inc.