nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] 2 little issues

2014-05-14 09:17:43
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.

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?

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

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