ken wrote:
how about this: when the last character of a text/plain part isn't a
newline, append the contents of yet-another-mh-format-script, which by
default would be a just a newline.
I raise the tty check since there could be scenarios where a part may be
validating (say cryptographically), and in such scenarios, the output of
the part would be going to a file or pipe and not directly to a terminal.
Could be a burden dealing with yet-another-mh-format-script when it
seems that the only time a LF should be appended is when dealing with a
tty.
I like mh-format(5) more than most people, but even I think it's the
wrong solution here. I think outputting a LF when the output is a tty
and the last character of the text part is not a LF.
Actually, that ends up being a BIT complicated, partially by the fact
that essentially the output is never a tty (in the default case, stdout
is a pipe to your pager). So the usual check of isatty(1) won't work.
besides -- just because i run the output of mhshow through less (external
to mhshow) shouldn't change whether i get newlines in my output or not.
i think checking tty is definitely wrong.
The default case is where there is no command to process text; in that
case an internal iconv() is performed, and the output is just written
out directly. How about the check for a missing LF at the end of
a text/plain in that specific case?
under which user conditions will/won't the newline be added?
paul
=----------------------
paul fox, pgf(_at_)foxharp(_dot_)boston(_dot_)ma(_dot_)us (arlington, ma,
where it's 53.2 degrees)
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers