[ESS] ess-eval-chunk

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Sun Jan 7 11:21:02 CET 2007

Shravan Vasishth writes:
 > Hi all,
 > Following earlier ess-help discussions, i use f5 for running chunks, but i
 > would also like to have focus shift to the command line in
 > the R buffer so I know what happened. As things stand, the code runs but I
 > have to C-x o to the other window running the R process. Basically I want a
 > single step chunk-evaluation the way we do C-c M-r for a region.
 > Here's the current code in my .emacs:
 > (defun my-ess-hook ()
 >    "Add my keybindings to ESS mode."
 >    (local-set-key (kbd "<f5>") 'ess-eval-chunk))
 >  (add-hook 'ess-mode-hook 'my-ess-hook)

Hi, I think the following defun might help you, also in the ESS

Best wishes, Stephen

(defun ess-eval-chunk-and-go (vis)
  "Tangle the current chunk, send to the ESS process, and go there.
Arg has same meaning as for `ess-eval-region'."

More information about the ESS-help mailing list