nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] I did something wrong with replcomps


From: Ken Hornstein
Subject: Re: [Nmh-workers] I did something wrong with replcomps
Date: Sun, 18 Dec 2016 11:01:39 -0500

>1. How many people on the planet are both smart and knowledgeable enough
>to have done that?

Good question!  To do it off of the top of their head, it's probably in the
low double digits.

This is a tough one; we're kind of stuck in that nmh has incredible
flexibility because (among other reasons) it's got a little embedded
language you can use for components files.  The downside here is you
actually have to understand the embedded language if you want to modify
the components files effectively.  We ship ones that do the right things
for most people; if you've modified the default components files it is
sort of expected you have a passing familiarity with how that works.
Really, in terms of documentation we have mh-format(5), which I will be
the first to admit isn't wonderful; I've tried to add to it over
the years (man, if Larry took his critical eye to mh-format(5) it sure
would be welcome!).  There is also fmttest(1), which should help you debug
format files.

>2. There is a line:
>
>%<{fcc}Fcc: %{fcc}\n%>\
>
>Containing the string, "fcc", twice and the string "Fcc" once. But it
>produces no Fcc line; NOR do I want it to.
>
>What's going on?

A couple of things (I realize that David already explained some of this).

First, %< is the start of an "if" statement.  Things surrounded by {}
are components (message headers).  This particular idiom means that the
stuff inside the if statement (everything inside the %< %>) is executed
if the "fcc" component is not null.

However (as I alluded to in my other message), this falls under the
category of what I like to call "pseudo-components".  These things are
used to pass information from switches into components files.  The
general idea for this particular one is that if you pass a -fcc switch
into repl, it will set the "fcc" component, and the line above will
include a "Fcc" header.  There are plenty of other examples where
these pseudo-components are used; they're just not well known.

--Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]