From maechler at stat.math.ethz.ch  Sat Mar 25 17:30:27 2006
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Sat, 25 Mar 2006 17:30:27 +0100
Subject: [Rd] Help please: please test timestamping of command history
In-Reply-To: <4424D394.7050204@stats.uwo.ca>
References: <002001c64ee8$415b9ce0$c1e66081@bio.flinders.edu.au>
	<4424D394.7050204@stats.uwo.ca>
Message-ID: <17445.28707.485402.183387@stat.math.ethz.ch>

Hi Duncan,

I think all ESS users don't use history() because ESS calls R  
with "--no-readline" (Unix)  
or   "--ess"  (Windows & Cygwin)

I'd wish that in that case, and probably also in BATCH mode,
timestamp() should write the time stamp prefixed by "##" to the
"R console" (to R's stdout); when people are using ESS properly, then
rather than wanting a history, they save the R's buffer ("*R*") as
"R transcript" (file typically ending with ".Rt" or ".Rout") 
and it makes much sense to have a time stampe entry in that file when
others would want an entry in the history.

BTW, after applying your patch, for me, compilation ends
prematurely with

gcc -I. -I../../src/include -I../../../R/src/include -I/usr/X11R6/include -I/usr/local/include -DHAVE_CONFIG_H   -g -O3 -pedantic -Wall -Wno-comment -DDEBUG_q -Wcast-align -c ../../../R/src/unix/stubs.c -o stubs.o
../../../R/src/unix/stubs.c: In function `do_addhistory':
../../../R/src/unix/stubs.c:46: warning: implicit declaration of function `ptr_R_addhistory'
../../../R/src/unix/stubs.c:46: error: `rho' undeclared (first use in this function)
../../../R/src/unix/stubs.c:46: error: (Each undeclared identifier is reported only once
../../../R/src/unix/stubs.c:46: error: for each function it appears in.)
../../../R/src/unix/stubs.c:46: warning: return makes pointer from integer without a cast
make[3]: *** [stubs.o] Error 1


Martin



[Rd] Help please: please test timestamping of command history
Martin Maechler