[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Set debug output width in REPL
From: |
Ludovic Courtès |
Subject: |
Re: Set debug output width in REPL |
Date: |
Fri, 25 Feb 2011 00:28:19 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) |
Hi,
Mike Gran <address@hidden> writes:
>> From:Mark H Weaver <address@hidden>
>
>>
>> Mark wrote:
>> > It seems to me that *width* should not be a global variable, but rather
>> > a per-repl setting. It probably belongs in the options field of the
>> > <repl> record, no? See "repl-default-options" in
>> repl/common.scm.
[...]
> How common is the use case where REPLs for a single Guile session appear
> in terminals of different width?
Think of ‘--listen’.
>> Mark also wrote:
>> Better yet, maybe it should be an optional attribute of the output port,
>> which would allow pretty-print and truncated-print to use it as well.
>> Output ports attached to terminals could determine the terminal width
>> from the OS, on systems that support it.
I like the idea of using the terminal’s width, but I dislike the idea of
having it a property of the port, since it really seems orthogonal to me.
> [...] If one wanted to have a port automatically
> query its terminal for the width, one could either (IIRC) catch the SIGWINCH
> signalor could call a getenv/tget function before printing a pretty-print or
> truncated-print.
How about having a per-REPL setting that’s automatically set to the
terminal’s width by default?
What’s the exact call to get the width?
Thanks,
Ludo’.