[ESS] ess-post-run-hook

Sebastian P. Luque spluque at gmail.com
Sat Aug 19 00:03:30 CEST 2006


Hi,

I couldn't find how to disable the ouput from the command that is sent to
R at startup, which results in the inferior ess buffer containing:


R> if(!exists("baseenv", mode="function")) baseenv <- function() NULL
options(STERM='iESS', editor='emacsclient')
R> R> 


and for clarity, I'd like to have a single prompt.  So I tried to do
delete that ouput with:


(add-hook 'ess-post-run-hook
	  (lambda ()
	    (while (search-backward-regexp inferior-ess-prompt nil t))
	    (comint-bol)
	    (delete-region (point) (point-max))))


But nothing is getting deleted, although everything within the lambda
expression is doing its job (testing from the inferior buffer itself).
Any idea what is wrong with this hook or some better way to accomplish
this?

Thanks,

-- 
Seb




More information about the ESS-help mailing list