1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

ensuring return to current buffer when executing R code

This commit is contained in:
Eric Schulte 2009-02-23 17:52:18 -08:00
parent 488fa39b27
commit f8c437e5c3

View File

@ -36,11 +36,12 @@
(defun litorgy-execute:R (body params)
"Execute a block of R code with litorgy. This function is
called by `litorgy-execute-src-block'."
(let (results)
(message "executing R code block...")
(litorgy-initiate-R-buffer)
(mapc (lambda (line) (litorgy-R-input-command line)) (butlast (split-string body "[\r\n]")))
(litorgy-R-last-output)))
(save-window-excursion
(let (results)
(message "executing R code block...")
(litorgy-initiate-R-buffer)
(mapc (lambda (line) (litorgy-R-input-command line)) (butlast (split-string body "[\r\n]")))
(litorgy-R-last-output))))
;; Maybe the following be replaced with a method using `ess-execute',
;; I went with the following functions because I wrote them and they