From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: port-with-print-state doesn't create a port? Or, when is a port not a port? :-) Date: Tue, 03 Jun 2014 18:57:52 -0400 Message-ID: <87oay9vbwv.fsf@yeeloong.lan> References: <87fvk3mcpo.fsf@gnu.org> <87mwe438ca.fsf@yeeloong.lan> <87bnuko6a7.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1401836325 7782 80.91.229.3 (3 Jun 2014 22:58:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Jun 2014 22:58:45 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jun 04 00:58:38 2014 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WrxfC-0006N0-4P for guile-devel@m.gmane.org; Wed, 04 Jun 2014 00:58:38 +0200 Original-Received: from localhost ([::1]:56241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrxfB-0005mr-It for guile-devel@m.gmane.org; Tue, 03 Jun 2014 18:58:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wrxf2-0005mf-4I for guile-devel@gnu.org; Tue, 03 Jun 2014 18:58:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wrxeu-0001LO-Jv for guile-devel@gnu.org; Tue, 03 Jun 2014 18:58:28 -0400 Original-Received: from world.peace.net ([96.39.62.75]:33406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wrxeu-0001KL-GN; Tue, 03 Jun 2014 18:58:20 -0400 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=yeeloong.lan) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Wrxed-00048j-Uu; Tue, 03 Jun 2014 18:58:04 -0400 In-Reply-To: <87bnuko6a7.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 26 May 2014 18:26:24 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 96.39.62.75 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17184 Archived-At: I wrote earlier: > As distasteful as this 'port-with-print-state' concept may be, I'm not > aware of a better solution. Fluids aren't quite right, because a > structure printer might cause I/O to happen on another port. Having thought more on this, I think fluids might be the right tool. The only detail is, the print state would have to include a reference to the associated port. Then, if the port passed to 'write' or 'display' doesn't match the one associated with the current-print-state, it would be saved and later restored, with a fresh new current-print-state used for the duration of that 'write' or 'display' call. What do you think? Mark