#721 closed defect (fixed)
parley seems to drop newlines when piping input from stdin
Reported by: | Alan Post | Owned by: | Christian Kellermann |
---|---|---|---|
Priority: | major | Milestone: | 4.9.0 |
Component: | extensions | Version: | 4.7.x |
Keywords: | parley stdin pasting | Cc: | |
Estimated difficulty: |
Description (last modified by )
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?
Attachments (1)
Change History (4)
Changed 13 years ago by
comment:1 Changed 13 years ago by
Component: | unknown → extensions |
---|---|
Description: | modified (diff) |
Keywords: | parley stdin pasting added |
Owner: | set to Christian Kellermann |
Status: | new → accepted |
Summary: | read-string will drop last line if that line does not end with newline → parley seems to drop newlines when piping input from stdin |
parley is in use in alan's .csirc, so the problem has been rededicated to parley
comment:2 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
This issue has been fixed in revision 25468 and should be available in parley 0.6 shortly.
test program with final newline removed.