>But, fine, solutions.  It turns out I was wrong; nmh probably can't help
>you here.  I was thinking that certain headers get concatenated by the
>format engine, but it seems like they don't.  E.g:
>[...]

Well, thinking about this more and digging into the code, I found out
that some of this is at least possible with nmh.  With the test file
from the previous message, this works:

% fmttest -format '%(void(addr{to}))%{to}' -file /tmp/testfile
[email protected], [email protected], [email protected]

(Don't ask me why you need %(void(addr{to})) before that unless you
want to get into a huge discussion about the guts of the format engine).
It turns out that scan(1) has always explicitly just taken the first
occurance of a particular header and ignored any subsequent copies of
the same header, but repl(1) has special handling to deal with this case
and it handles multiple address headers just fine and I replicated the
repl(1) handling when I wrote fmttest(1).  So that's an option if you want
to try cooking something up.  Obviously the best solution would be
to not generate multiple To or Cc headers.

--Ken

Reply via email to