Hi Ken,
Earl wrote:
I am unclear as to the right solution. Obviously adjusting the MIME
parsing routines is wrong. Making sure that the last character of
text/plain parts on output contains a newline might be better, but
I'm not sure that's technically right either.
One could take the view that those receiving non-Unix text files from
ITS users know where to shove them. :-)
Pagers like 'less' do this. If the file being viewed does not end in
a LF, 'less' will add a break so the 'less' status line is still
rendered at the bottom of the terminal window on its own line.
...
Since adding a LF would only be done whe rendering the content, and it
is not modifying the original data, I see no problem.
I think I'd prefer to see that this part's last line is missing a line
terminator. That might be by the status line indicating it, as Earl
said vim does, or just by the status line not starting in column one.
A sample of how other commands handle it...
$ ls
1 2 3
$
$ cat *; echo
foobarxyzzy
$
$ more *
::::::::::::::
1
::::::::::::::
foo
::::::::::::::
2
::::::::::::::
bar
::::::::::::::
3
::::::::::::::
xyzzy
$
$ more * | cat
::::::::::::::
1
::::::::::::::
foo::::::::::::::
2
::::::::::::::
bar::::::::::::::
3
::::::::::::::
xyzzy$
$
$ less * | cat
foobarxyzzy$
$
$ head *
==> 1 <==
foo
==> 2 <==
bar
==> 3 <==
xyzzy$
$
$ grep ^ *
1:foo
2:bar
3:xyzzy
$
$ sed -n l *
foo$
bar$
xyzzy$
$
So head(1) doesn't add a LF after ./3 because it's not about to display
another header.
Cheers, Ralph.
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers