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

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



This is a better way to do it:

(defun ess-eval-chunk-and-step (&optional vis)
  "Tangle the current chunk and send it to the inferior ESS process and
step to the next chunk"
  (interactive)
  (save-excursion
    (funcall 'ess-eval-chunk vis))
  (funcall 'ess-noweb-next-code-chunk 1))



I have just pushed a version of this into trunk. 

ess-eval-chunk-and-step is now bound to M-n C-c 
ess-eval-chunk          is now bound to M-n C-M-x 

Corresponding to C-c C-c and C-M-x ess map.

    Vitalie.


  >> "Warnes, Gregory" <gregory.warnes at novartis.com>
  >> on Fri, 12 Oct 2012 15:30:17 +0000 wrote:

  > Here is another function, which displays the R buffer and scrolls it
  > appropriately.  Oddly, for some reason, this generates an error in the
  > current SVN version (replacing 'noweb-next-code-chunk with
  > 'ess-noweb-code-chunk), but is happy under 12.4	

  > (defun ess-eval-chunk-show-and-step ()
  >   "Tangle the current chunk and send it to the inferior ESS process and
  > step to the next chunk"
  >   (interactive)
  >   ;; ess-eval-chunk forgets the current buffer, so store and restore it
  >   (let ( 
  > 	(cbuf (current-buffer) )
  > 	)
  >     (command-execute 'ess-eval-chunk-and-go)
  >     (switch-to-buffer-other-window cbuf)
  >     )

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

  > -Greg



More information about the ESS-help mailing list