nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] 2 little issues

2014-05-13 23:43:07
On Tue, May 13, 2014 at 11:12 PM, Paul Fox wrote:

the easy thing to do would be to always add an extra newline in front
of the part marker, but that will cause an extraneous newline in most
cases.  the more clever thing to do would be to only add it if the
previous part didn't end in a newline, but that's perhaps a bit hard,
since the previous part was displayed by other code, far far away.

How about this following: The component that displays the part, appends
a LF only if there is no LF at end of part and if output is to a tty?


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.

--ewh

_______________________________________________
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>