ensuring return to current buffer when executing R code
This commit is contained in:
parent
488fa39b27
commit
f8c437e5c3
|
@ -36,11 +36,12 @@
|
||||||
(defun litorgy-execute:R (body params)
|
(defun litorgy-execute:R (body params)
|
||||||
"Execute a block of R code with litorgy. This function is
|
"Execute a block of R code with litorgy. This function is
|
||||||
called by `litorgy-execute-src-block'."
|
called by `litorgy-execute-src-block'."
|
||||||
(let (results)
|
(save-window-excursion
|
||||||
(message "executing R code block...")
|
(let (results)
|
||||||
(litorgy-initiate-R-buffer)
|
(message "executing R code block...")
|
||||||
(mapc (lambda (line) (litorgy-R-input-command line)) (butlast (split-string body "[\r\n]")))
|
(litorgy-initiate-R-buffer)
|
||||||
(litorgy-R-last-output)))
|
(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',
|
;; Maybe the following be replaced with a method using `ess-execute',
|
||||||
;; I went with the following functions because I wrote them and they
|
;; I went with the following functions because I wrote them and they
|
||||||
|
|
Loading…
Reference in New Issue