Message-ID: <16545.53575.897894.285835@gargle.gargle.HOWL>
Date: 2004-05-12T09:25:00Z
From: Martin Maechler
Subject: stdout == 'Terminal' or 'File' {was 'bad interaction ...'}
In-Reply-To: <40A1DD15.3020809@cu.lu>
>>>>> "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.