SWI-Prolog/swish

with_output_to(string(X), writeln(blah)) does not redirect

Closed this issue · 1 comments

In swish, query

with_output_to(string(Foo), writeln(blah)).

Output appears, Foo is bound to null string.

This is because writeln/1 is redefined. I've pushed a patch to library(pengines_io) that detects that the I/O was redirected and in that case calls the original versions.