unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mike Gran <spk121@yahoo.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: Set debug output width in REPL
Date: Mon, 21 Feb 2011 14:55:05 -0800 (PST)	[thread overview]
Message-ID: <309828.81527.qm@web37907.mail.mud.yahoo.com> (raw)

> From:Mark H Weaver <mhw@netris.org>

> 
> 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.

For my personal case, when I run the REPL, I run it in a single terminal.
When new REPLs are spawned, they are recursive.  If we implemented such
a patch, it might make sense to have children inherit the width of their
parents.

How common is the use case where REPLs for a single Guile session appear
in terminals of different width?

> 
> 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.

This would also work, but, the width of terminals can change when windows
are resized.  So, updating that attribute would either have to be a manual
call to query the width and update it or it'd have to try to automatically
query the terminal for the width.  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.

> 
> What do you think?

The important thing for me is to be able to spread backtrace
information over a couple of terminal lines, so I'd like to be able to set
a default width that is greater than the terminal width.

Thanks,

Mike



             reply	other threads:[~2011-02-21 22:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-21 22:55 Mike Gran [this message]
2011-02-24 23:28 ` Set debug output width in REPL Ludovic Courtès
2011-02-26  9:17   ` Mark H Weaver
2011-03-05 19:18   ` Mark H Weaver
  -- strict thread matches above, loose matches on Subject: below --
2011-02-25  1:43 Mike Gran
2011-02-21  6:02 Mike Gran
2011-02-21 16:12 ` Mark H Weaver
2011-02-21 16:36   ` Mark H Weaver
2011-03-04 10:17 ` Andy Wingo
2011-03-05 13:26   ` Ludovic Courtès
2011-03-05 19:01     ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=309828.81527.qm@web37907.mail.mud.yahoo.com \
    --to=spk121@yahoo.com \
    --cc=guile-devel@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).