[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] 2 little issues
From: |
Ken Hornstein |
Subject: |
Re: [Nmh-workers] 2 little issues |
Date: |
Wed, 14 May 2014 10:18:24 -0400 |
>> 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
- Re: [Nmh-workers] 2 little issues, Ken Hornstein, 2014/05/07
- Re: [Nmh-workers] 2 little issues, Ken Hornstein, 2014/05/13
- Re: [Nmh-workers] 2 little issues, Earl Hood, 2014/05/13
- Re: [Nmh-workers] 2 little issues, Paul Fox, 2014/05/14
- Re: [Nmh-workers] 2 little issues, Earl Hood, 2014/05/14
- Re: [Nmh-workers] 2 little issues,
Ken Hornstein <=
- Re: [Nmh-workers] 2 little issues, Paul Fox, 2014/05/14
- Re: [Nmh-workers] 2 little issues, Ken Hornstein, 2014/05/14
- Re: [Nmh-workers] 2 little issues, Earl Hood, 2014/05/14
- Re: [Nmh-workers] 2 little issues, Paul Fox, 2014/05/14
- Re: [Nmh-workers] 2 little issues, Ralph Corderoy, 2014/05/21