Skip to content

Commit

Permalink
Don't relay write-special for stdout/stderr; fixes #677
Browse files Browse the repository at this point in the history
Although we handle write-special in a temporary values port in
print.rkt, for convertible image values, we don't need to generally
for current-output-port or current-error-port.

We were already ignoring non-image special values in the Emacs front
end. So handling write-special in the general ports in the back end
only means we might try, unnecessarily, to elisp-write some arbitrary
Racket value, and sometimes fail. (Whatever the student langs and
DrRacket are doing in this regard with write-special, beyond images,
we can ignore for now, and maybe forever.)
  • Loading branch information
greghendershott committed Nov 14, 2023
1 parent 0abcedb commit 216d297
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions racket/repl-output.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,8 @@
(async-channel-put repl-output-channel
(repl-output kind (subbytes bstr start end)))
(- end start))
(define (write-out-special v _non-block? _breakable?)
(async-channel-put repl-output-channel
(repl-output special-kind v))
#t)
(define close void)
(make-output-port name
repl-output-channel
write-out
close
write-out-special))
close))

0 comments on commit 216d297

Please sign in to comment.