From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Christopher Cramer Newsgroups: gmane.lisp.guile.user Subject: Re: Redirecting guile's output to more/less Date: Mon, 25 Mar 2002 20:55:01 -0600 Sender: guile-user-admin@gnu.org Message-ID: <20020325205501.B4171@kiwi.pyrotechnics.com> References: <15519.40933.697434.441352@minos.phy.bnl.gov> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1017111287 1361 127.0.0.1 (26 Mar 2002 02:54:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 26 Mar 2002 02:54:47 +0000 (UTC) Cc: guile-user@gnu.org Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16ph6l-0000Lq-00 for ; Tue, 26 Mar 2002 03:54:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16ph65-0006Mj-00; Mon, 25 Mar 2002 21:54:05 -0500 Original-Received: from pyro.net ([207.7.10.2] helo=kiwi.pyro.net) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 16ph4H-0006Kl-00 for ; Mon, 25 Mar 2002 21:52:13 -0500 Original-Received: (qmail 6270 invoked by uid 8610); 26 Mar 2002 02:55:02 -0000 Original-To: Brett Viren Mail-Followup-To: Brett Viren , guile-user@gnu.org Content-Disposition: inline User-Agent: Mutt/1.2.5i 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 Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:63 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:63 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 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