[ESS] Suggestion: ess-eval-chunk-and-step

Vitalie Spinu spinuvit at gmail.com
Fri Oct 12 13:50:09 CEST 2012

  >> "Warnes, Gregory" <gregory.warnes at novartis.com>
  >> on Thu, 11 Oct 2012 00:14:24 +0000 wrote:

  WG> This seems to work:
  WG> (defun ess-eval-chunk-and-step ()
  WG>   "Tangle the current chunk and send it to the inferior ESS process and
  WG> step to the next chunk"
  WG>   (interactive)
  WG>   ;; ess-eval-chunk forgets the current buffer, so store and restore it
  WG>   (let ((cbuf (current-buffer) ))
  WG>     (command-execute 'ess-eval-chunk)
  WG>     (set-buffer cbuf)
  WG>     )

  WG>   (command-execute 'noweb-next-code-chunk)
  WG>   )

  WG> (define-key ess-mode-map (kbd "<f5>") 'ess-eval-chunk)
  WG> (define-key ess-mode-map (kbd "S-<f5>") 'ess-eval-chunk-and-step)

Very useful indeed. I need this all the time. Would be good to assign
keys for ess-eval-chunk and ess-eval-chunk-and-set. Any proposals?


More information about the ESS-help mailing list