unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: guile-devel@gnu.org
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	[thread overview]
Message-ID: <877g4xgjxy.fsf@gnu.org> (raw)
In-Reply-To: <87oay9vbwv.fsf@yeeloong.lan> (Mark H. Weaver's message of "Tue,  03 Jun 2014 18:57:52 -0400")

Mark H Weaver <mhw@netris.org> 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’d have to
check on a concrete use case.

Ludo’.



      reply	other threads:[~2014-06-04  8:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-17 18:10 port-with-print-state doesn't create a port? Or, when is a port not a port? :-) Doug Evans
2014-05-21 14:24 ` Ludovic Courtès
2014-05-25 19:05   ` Doug Evans
2014-05-26 14:47   ` Mark H Weaver
2014-05-26 16:26     ` Ludovic Courtès
2014-06-03 22:57       ` Mark H Weaver
2014-06-04  8:25         ` Ludovic Courtès [this message]

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=877g4xgjxy.fsf@gnu.org \
    --to=ludo@gnu.org \
    --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).