That puts multiple addresses on the same line, delimited by commas. But commas
can also occur in comments, so I would have to go to some trouble to parse the
output. Is there a variant that would put each address on on a separate line?
I tried sprinkling '\n's in your format string, to no avail.
Unfortunately ... mh-format(5) doesn't really have the ability to parse
multiple addresses. You can build up a list of addresses with %(formataddr),
but you can't really "take the next address in a list and do something with
it". There are also no loop operations, which is what you'd really need.
I've kind of thought about that vaguely, but I never came up with a reasonable
way of dealing with it. To ensure that mh-format completes you probably
want some bounded kind of loop that would parse an address list and set
str to each address in the list. Actually, I see that wouldn't really work
as all of the useful functions require a component argument. It would
be pretty complicated to implement. Maybe it would look like ...
%[{to} <some code that executes with "to" being set to each address in the
address list> %]
I could try to RTFM, i.e. to read and understand the man page for mh-format,
but I've been hoping to die before that.
Didn't you guys invent mh-format, or was that something that got done at UCI?
--Ken
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers