Patch for bug #24816: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24816 Patch is for Guile 2.1.7.1 (problem dates back at least as far as 2.1.4). Problem is that the extraction thunk returned by open-string-output-port in module "rnrs io ports" does not truncate the string port as expected by R6RS (page 39 of the library standard document). The open-string-output-port procedure (module/rnrs/io/ports.scm) is changed to make the extraction thunk call truncate-file on the string port after extracting its contents. In order to make that work, string ports were made truncatable (libguile/strports.c). A test (test-suite/tests/r6rs-ports.scm) was added to make sure that the string port is truncated by the thunk. Freja Nordsiek