From maechler at stat.math.ethz.ch  Wed May 12 09:24:55 2004
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Wed May 12 09:25:00 2004
Subject: [Rd] stdout == 'Terminal' or 'File' {was 'bad interaction ...'}
In-Reply-To: <40A1DD15.3020809@cu.lu>
References: <Pine.LNX.4.44.0405111604570.26648-100000@bolker.zoo.ufl.edu>
	<40A1DD15.3020809@cu.lu>
Message-ID: <16545.53575.897894.285835@gargle.gargle.HOWL>

>>>>> "MartinS" == Martin Schlather <schlather@cu.lu>
>>>>>     on Wed, 12 May 2004 09:15:17 +0100 writes:

    MartinS> Dear Ben,

    MartinS> I do not know how to solve the general problem that
    MartinS> backspaces cause within Sweave, but which are
    MartinS> needed to implement running counters.

aha!  now I understand more what you are talking about.

This is a more interesting problem, in general: It's not quite a
matter of if(interactive()) that Ben tried, but really you want
to find out if the stdout() connection you are using is a normal file
(where you don't need or want a running counter) or a 
user terminal where Martin Schlather applied the  1^H2^H... ('1' Backspace
'2' Backspace ..) trick.

Any ideas what can be done here, using our current  connection
tools -- or is there the need for something new?
Interesting topic!

Martin M?chler

PS. I know that strictly speaking the subject question is
 non-sense, since, at least on Unix-alikes, a console is a
 special file as well, and stdout is always a file.


[Rd] stdout == 'Terminal' or 'File' {was 'bad interaction ...'}
Martin Maechler