From murdoch at stats.uwo.ca  Sun Mar 26 19:41:03 2006
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Sun, 26 Mar 2006 12:41:03 -0500
Subject: [Rd] Help please: please test timestamping of command history
In-Reply-To: <4425A0E3.8070108@stats.uwo.ca>
References: <002001c64ee8$415b9ce0$c1e66081@bio.flinders.edu.au>	<4424D394.7050204@stats.uwo.ca>	<17445.28707.485402.183387@stat.math.ethz.ch>
	<4425A0E3.8070108@stats.uwo.ca>
Message-ID: <4426D22F.3040709@stats.uwo.ca>

I managed to get an R build going on a Linux box, and tested the changes 
there.  Now they're committed to R-devel.

Duncan Murdoch

On 3/25/2006 2:58 PM, Duncan Murdoch wrote:
> On 3/25/2006 11:30 AM, Martin Maechler wrote:
>> 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
> 
> Okay, this compile error is fixed.  I've put a new version of the patch in
> 
> http://www.stats.uwo.ca/faculty/murdoch/software/timestamp.patch
> 
> I haven't addressed the ESS request above other than changing the 
> message prefix to start with ##; I don't know how to detect ESS from 
> within an R session.
> 
> Duncan Murdoch
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Help please: please test timestamping of command history
Duncan Murdoch