From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Gran Newsgroups: gmane.lisp.guile.devel Subject: Re: Set debug output width in REPL Date: Mon, 21 Feb 2011 14:55:05 -0800 (PST) Message-ID: <309828.81527.qm@web37907.mail.mud.yahoo.com> Reply-To: Mike Gran NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1298328923 6103 80.91.229.12 (21 Feb 2011 22:55:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 Feb 2011 22:55:23 +0000 (UTC) Cc: guile-devel To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Feb 21 23:55:19 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Preex-0002zt-3y for guile-devel@m.gmane.org; Mon, 21 Feb 2011 23:55:15 +0100 Original-Received: from localhost ([127.0.0.1]:43175 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Preew-0002I4-Oa for guile-devel@m.gmane.org; Mon, 21 Feb 2011 17:55:14 -0500 Original-Received: from [140.186.70.92] (port=55585 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Preep-0002Hp-Oh for guile-devel@gnu.org; Mon, 21 Feb 2011 17:55:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Preeo-0007MQ-N5 for guile-devel@gnu.org; Mon, 21 Feb 2011 17:55:07 -0500 Original-Received: from web37907.mail.mud.yahoo.com ([209.191.91.169]:44018) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Preeo-0007MM-DF for guile-devel@gnu.org; Mon, 21 Feb 2011 17:55:06 -0500 Original-Received: (qmail 83027 invoked by uid 60001); 21 Feb 2011 22:55:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1298328905; bh=hprfBMW1JsLBQZeM+qHBPTrLB2Aw2uiELHAPNVI/kTE=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type; b=kvdkTvskXlGUmHia/Z77sM5yqB0RWZcsbBD4ES3zZ9NFVvFnDYPI8dhaWAmmsiwSRw0mYGXayTHKX+03Oujtv0FE6IQQHY3of6lSLWPFzFNdDI7cSlc0lS8DZQ2XXNDt9LHu5MjPLSAvXoX94tFiPHsTy0XAxUBiMbRCW1MeLW8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type; b=sNseCW7iHBRRM8mSK8i/Zhxe7Piha83S5NXuQicWkv6nmXaCjN+NHMnmyOakMtjrOAFwq1MAO5zxylnwEMYCoflyc5upRrLX4J/8dZV1H6KpfF98lMgpq+B5k5NHVVMIDCqmT0I3Ba7zpBUv8mRpDrvJgaKKzOa1zBhPKr2gtUs=; X-YMail-OSG: fGqNR_UVM1lvr6.JwNvBNcAQBpncmlTeAdlauaJ1GGmhSvt R_89FPPnKWSX7YraONs4AEN3FMT7h0qo7eUO9pzIho1.ckBVjcF5bfgk3OkK sSdiaEo.AU0UDbei3ye1iMVggmaSe.y2lLqHKLc1bTUxKT4HZ_DytszZbG7P YQSW3mtMp5GdpOeOWU3CWHy8ZtdRM6CICy7qbH.Vn.okVEwJCkjWshXd4W0Z gsx8B0QdFw13G_Cq6DGGiEfc.W0Hlu7wPb.3FSsSv73dYbOWq2UBhqOyO4I2 FuEPo3OQgu0dlc35peY_5ZF5DE65ZDGcGsIBh16qzzoe4yu2gHw_2a5e5a3X vhThS.Qa6_Bpxdi8ofAiJpA-- Original-Received: from [71.130.219.67] by web37907.mail.mud.yahoo.com via HTTP; Mon, 21 Feb 2011 14:55:05 PST X-Mailer: YahooMailWebService/0.8.109.292656 X-detected-operating-system: by eggs.gnu.org: FreeBSD 6.x (1) X-Received-From: 209.191.91.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11674 Archived-At: > From:Mark H Weaver > > 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 > > 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