unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Christopher Cramer <crayc@pyro.net>
Cc: guile-user@gnu.org
Subject: Re: Redirecting guile's output to more/less
Date: Mon, 25 Mar 2002 20:55:01 -0600	[thread overview]
Message-ID: <20020325205501.B4171@kiwi.pyrotechnics.com> (raw)
In-Reply-To: <15519.40933.697434.441352@minos.phy.bnl.gov>; from bv@bnl.gov on Mon, Mar 25, 2002 at 05:08:37PM -0500

On Mon, Mar 25, 2002 at 05:08:37PM -0500, Brett Viren wrote:
> I have a C library which has functions that print to stdout, sometimes
> filling several screens.  I would like to somehow redirect this output
> temporarily to whatever is in the PAGER env. var.  After the PAGER
> quits, then regular interactive guile output should continue to go to
> stdout.  
> 
> Is it possible?

It's possible. What you would do is, dup stdout, open a pipe to less,
dup2 it to stdout, wait for less to exit, dup2 the old stdout back.

The default output port for Guile doesn't necessarily have to be stdout,
by the way.

-- 
Christopher Cramer <crayc@pyro.net> <http://www.pyro.net/~crayc/>
Quoi que vous fassiez, écrasez l'infâme, et aimez qui vous aime.
	-- Voltaire

_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


      reply	other threads:[~2002-03-26  2:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-25 22:08 Redirecting guile's output to more/less Brett Viren
2002-03-26  2:55 ` Christopher Cramer [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=20020325205501.B4171@kiwi.pyrotechnics.com \
    --to=crayc@pyro.net \
    --cc=guile-user@gnu.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).