[ESS] 2 things I wish ESS would do
sje30 at cam.ac.uk
Fri Oct 10 14:09:21 CEST 2008
Vitalie Spinu <vitosmail at rambler.ru> wrote:
> A couple of work arounds have been proposed for the above request,
> mainly creating a temporary transcript buffer foo.Rt, coping the
> region and applying ess-transcript-clean-region.
> Wouldn't it be easier if such a buffer exists from the very beginning
> of the session (say *history*) and all the input commands already
> cleaned of
> > ,+ and indented appropriately being flushed into it automatically?
> This "running history" is extremely handy as implemented in Matlab -
> at any time one can switch there and run/copy any range of lines.
> For CLI in Linux the solution was proposed here
> To my understanding iESS command history is somewhere in the emacs
> memory. Is it possible somehow to flush it to an .R buffer and
> continuously update it?
Yes, the history of commands typed into an *R* buffer can be found in
the variable comint-input-ring and you can even get a separate window
showing its contents to date using M-x comint-dynamic-list-input-ring
but as you type new commands, that input history is not automatically
updated (which is what you want I think).
So I think the answer for now is that with a bit of lisp'ing, you could
get something working (e.g. a hook to refresh the history after each new
command, and perhaps put the commands in their own dedicated window).
Done in the right way, it need not even be specific to ESS, and so other
modes could also benefit. Its probably a few hours work, but I don't
have that time spare right now...
More information about the ESS-help