Summary

parley seems to drop newlines when piping input from stdin

Metadata

Attachments

Description

The following program:

 (let ((file (read-string)))
   (write file))

is a simple test of read-string. The following does not produce the result I expect:

 $ csi test.scm < test.scm
 "(let ((file (read-string)))  (write file))\n"

It appears if the newline in the middle of the file is not being preserved? Further, if I remove the "\n" from the test.scm file (please find it attached, I used a program called bvi to remove it, most editors will not let you save a file with a missing final newline), I get:

 $ dd if=test.scm bs=1 count=42|csi test.scm
 "(let ((file (read-string)))\n"

It seems the final line is being dropped! What is going on here? I expect read-string, when not given a size, to return my input file byte-for-byte?

Changes and comments

[2011-10-26 21:15:08 UTC] alanpost attached test.scm (description=test program with final newline removed.)

[2011-10-26 21:27:17 UTC] ckeen changed status from new to accepted

[2011-10-26 21:27:17 UTC] ckeen changed description

[2011-10-26 21:27:17 UTC] ckeen changed component from unknown to extensions

[2011-10-26 21:27:17 UTC] ckeen changed summary

[2011-10-26 21:27:17 UTC] ckeen set owner to ckeen

[2011-10-26 21:27:17 UTC] ckeen set keywords to parley stdin pasting

[2011-10-26 21:27:17 UTC] ckeen wrote:

parley is in use in alan's .csirc, so the problem has been rededicated to parley

[2011-10-30 14:08:13 UTC] ckeen wrote:

This issue has been fixed in revision 25468 and should be available in parley 0.6 shortly.

[2011-10-30 14:08:13 UTC] ckeen changed status from accepted to closed

[2011-10-30 14:08:13 UTC] ckeen set resolution to fixed

[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0

[2012-09-24 21:47:48 UTC] felix wrote:

Milestone 4.8.0 deleted