Kawa has an unique (?) feature in that it can defer line-breaking and
indentation to a suitable terminal (specifically DomTerm). If the
terminal changes line width, the output is re-formatted - even for output
from previous commands - even if the kawa command has finished running.
You can see it in action here: https://domterm.org/saved/dt-prettynested.html
Try changing the window width. You can also click triangles to show/hide sections.
This is a transcript of a terminal session, but with embedded control
sequences to mark blocks, soft line-breaks (multiple kinds, as in Common Lisp),
and indentation. Some Javascript code does the actual line-breaking.
This line-breaking is normally in the context of an actual "live" terminal session,
but can also be done (as in the demo) in a "saved" session ("transcript").
Here is an old blog article: https://per.bothner.com/blog/2017/dynamic-prettyprinting/
It would be nice if SRFI-272 could make use of these facilities.
--
--Per Bothner
xxxxxx@bothner.com http://per.bothner.com/