summaryrefslogtreecommitdiff
path: root/lisp/org/ob-R.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org/ob-R.el')
-rw-r--r--lisp/org/ob-R.el29
1 files changed, 10 insertions, 19 deletions
diff --git a/lisp/org/ob-R.el b/lisp/org/ob-R.el
index 93d1d34229b..f68b5b44e4d 100644
--- a/lisp/org/ob-R.el
+++ b/lisp/org/ob-R.el
@@ -4,9 +4,9 @@
;; Author: Eric Schulte
;; Dan Davison
-;; Maintainer: Jeremie Juste
+;; Maintainer: Jeremie Juste <jeremiejuste@gmail.com>
;; Keywords: literate programming, reproducible research, R, statistics
-;; Homepage: https://orgmode.org
+;; URL: https://orgmode.org
;; This file is part of GNU Emacs.
@@ -29,6 +29,9 @@
;;; Code:
+(require 'org-macs)
+(org-assert-version)
+
(require 'cl-lib)
(require 'ob)
@@ -40,13 +43,6 @@
(declare-function ess-wait-for-process "ext:ess-inf"
(&optional proc sec-prompt wait force-redisplay))
-;; FIXME: Temporary declaration to silence the byte-compiler
-(defvar user-inject-src-param)
-(defvar ess-eval-visibly-tmp)
-(defvar ess-eval-visibly)
-(defvar ess-inject-source)
-(defvar user-inject-src-param)
-
(defconst org-babel-header-args:R
'((width . :any)
(height . :any)
@@ -385,7 +381,7 @@ Has four %s escapes to be filled in:
(if session
(if async
(ob-session-async-org-babel-R-evaluate-session
- session body result-type result-params column-names-p row-names-p)
+ session body result-type column-names-p row-names-p)
(org-babel-R-evaluate-session
session body result-type result-params column-names-p row-names-p))
(org-babel-R-evaluate-external-process
@@ -486,7 +482,7 @@ Insert hline if column names in output have been requested."
(defconst ob-session-async-R-indicator "'ob_comint_async_R_%s_%s'")
(defun ob-session-async-org-babel-R-evaluate-session
- (session body result-type _ column-names-p row-names-p)
+ (session body result-type column-names-p row-names-p)
"Asynchronously evaluate BODY in SESSION.
Returns a placeholder string for insertion, to later be replaced
by `org-babel-comint-async-filter'."
@@ -525,7 +521,8 @@ by `org-babel-comint-async-filter'."
(output
(let ((uuid (md5 (number-to-string (random 100000000))))
(ess-local-process-name
- (process-name (get-buffer-process session))))
+ (process-name (get-buffer-process session)))
+ (ess-eval-visibly-p nil))
(with-temp-buffer
(insert (format ob-session-async-R-indicator
"start" uuid))
@@ -534,13 +531,7 @@ by `org-babel-comint-async-filter'."
(insert "\n")
(insert (format ob-session-async-R-indicator
"end" uuid))
- (setq ess-eval-visibly-tmp ess-eval-visibly)
- (setq user-inject-src-param ess-inject-source)
- (setq ess-eval-visibly nil)
- (setq ess-inject-source 'function-and-buffer)
- (ess-eval-buffer nil))
- (setq ess-eval-visibly ess-eval-visibly-tmp)
- (setq ess-inject-source user-inject-src-param)
+ (ess-eval-buffer nil ))
uuid))))
(defun ob-session-async-R-value-callback (params tmp-file)