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

Warnes, Gregory gregory.warnes at novartis.com
Fri Oct 12 17:30:17 CEST 2012


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





-- 
Gregory Warnes, Ph.D.
Sr. Expert Modeler
Modeling and Simulation
CA Phone: +1 617 871-8498
gregory.warnes at novartis.com







On 10/12/12 8:37 AM, "Landis, R. Matthew" <landis at isciences.com> wrote:

>
>On 12 Oct, 2012, at 7:50 AM, Vitalie Spinu <spinuvit at gmail.com> wrote:
>> 
>> 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?
>> 
>I agree.  If these functions do what I think they do, I would love to use
>them.  Would something like this also work in org-mode / Babel?  I find
>that I use that a lot more than Sweave.
>
>Great idea.  
>
>Matt
>
>



More information about the ESS-help mailing list