[ESS] A function (ess-eval-paragraph)

Dan Bolser dmb at mrc-dunn.cam.ac.uk
Fri Mar 17 14:39:51 CET 2006


A.J. Rossini wrote:
> Could you describe what exactly the function is supposed to do?  (it
> isn't clear to me what specifically you are defining as a paragraph!).
> 
> Note that there is already an ess-eval-paragraph (in ess-inf.el),
> could you quickly compare functionality?

Ah! I didn't see it in the ESS menu, so I assumed it was not anywhere!

My function is the same, except it moves the cursor forward by 'one 
paragraph' and (tries to) 'page end' the R process buffer (so you can 
see if the paragraph you just sent was evaluated correctly) like C-c C-n 
does C-c C-j does not.


Cheers,
Dan.

> On 3/17/06, Dan Bolser <dmb at mrc-dunn.cam.ac.uk> wrote:
> 
>>I thought I would post this code in the case that anyone finds it
>>useful, or can offer some improvements. I use sql-mode all the time, so
>>I find this function 'missing' from ess...
>>
>>
>>(defun ess-eval-paragraph ()
>>  (interactive)
>>  (mark-paragraph)
>>  (call-interactively  'ess-eval-region)
>>  ;;(with-current-buffer "*R*" (end-of-buffer))
>>  ;;(save-excursion (ess-switch-to-end-of-ESS))
>>  (end-of-buffer-other-window 0)
>>  (forward-paragraph)
>>  )
>>
>>(global-set-key (kbd "C-c C-c") 'ess-eval-paragraph)
>>
>>
>>The "(end-of-buffer-other-window 0)" line is not great, but the only
>>thing I could make work (see commented out sections). Not sure how 'C-c
>>C-n' handles this same issue.
>>
>>______________________________________________
>>ESS-help at stat.math.ethz.ch mailing list
>>https://stat.ethz.ch/mailman/listinfo/ess-help
>>
> 
> 
> 
> --
> best,
> -tony
> 
> blindglobe at gmail.com
> Muttenz, Switzerland.
> "Commit early,commit often, and commit in a repository from which we can easily
> roll-back your mistakes" (AJR, 4Jan05).




More information about the ESS-help mailing list