From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) 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: Wed, 04 Jun 2014 10:25:45 +0200 Message-ID: <877g4xgjxy.fsf@gnu.org> References: <87fvk3mcpo.fsf@gnu.org> <87mwe438ca.fsf@yeeloong.lan> <87bnuko6a7.fsf@gnu.org> <87oay9vbwv.fsf@yeeloong.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1401870419 11077 80.91.229.3 (4 Jun 2014 08:26:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Jun 2014 08:26:59 +0000 (UTC) Cc: guile-devel@gnu.org To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jun 04 10:26:52 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 1Ws6X1-0005T5-Oq for guile-devel@m.gmane.org; Wed, 04 Jun 2014 10:26:47 +0200 Original-Received: from localhost ([::1]:58160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ws6X1-0007Eo-CY for guile-devel@m.gmane.org; Wed, 04 Jun 2014 04:26:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ws6WB-0006IA-2u for guile-devel@gnu.org; Wed, 04 Jun 2014 04:26:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ws6W5-0002rw-3N for guile-devel@gnu.org; Wed, 04 Jun 2014 04:25:55 -0400 Original-Received: from hera.aquilenet.fr ([2a01:474::1]:57367) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ws6W4-0002rN-T6 for guile-devel@gnu.org; Wed, 04 Jun 2014 04:25:49 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 6881F2AEE; Wed, 4 Jun 2014 10:25:47 +0200 (CEST) Original-Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id giYvoH3o28F4; Wed, 4 Jun 2014 10:25:47 +0200 (CEST) Original-Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id DFC2D2850; Wed, 4 Jun 2014 10:25:46 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 Prairial an 222 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <87oay9vbwv.fsf@yeeloong.lan> (Mark H. Weaver's message of "Tue, 03 Jun 2014 18:57:52 -0400") User-Agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:474::1 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:17186 Archived-At: Mark H Weaver skribis: > 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? Yes, it seems like it should work, and I find it natural. We=E2=80=99d hav= e to check on a concrete use case. Ludo=E2=80=99.