nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] mh-format multiply function

2015-01-09 13:33:00
Rather than multiply, may I susggest another funncton, which would give
mutliply and much more.

              %(exec procedure_name)

It would exec procedure_name and return its stdout. It would not redirect
stderr. For each component, comp, of the messages, it would define an
environment variable, NMH_FORMAT_comp, whose value was the content of that
component.

There ... are some concerns.

First, we'd have to be careful about component contents being parsed
properly, but that's mostly a problem for shell programs.  That's more of
a caveat emptor thing.  This is the same concern as Jerrad's one about
attack vectors; that's the thing that sticks out at me as the biggest
problem right away.

Secondly, when a mh-format program is run, it _cannot_ fail; literally,
there's no facility for it to fail.  When it gets compiled, yes, that
can fail.  But return an error code?  We don't really have a good way
in mh-format to deal with this.  I think it might be too much.

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>