[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] 2 little issues

From: Paul Fox
Subject: Re: [Nmh-workers] 2 little issues
Date: Wed, 14 May 2014 10:31:25 -0400

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 fox, address@hidden (arlington, ma, where it's 53.2 degrees)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]