Browse Source

babel: purging all calls to removed org-babel-ref-variables

* lisp/ob-clojure.el (org-babel-prep-session:clojure): purging all
  calls to removed org-babel-ref-variables

* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars): purging all
  calls to removed org-babel-ref-variables

* lisp/ob-ruby.el (org-babel-prep-session:ruby): purging all calls to
  removed org-babel-ref-variables

* lisp/ob-scheme.el (org-babel-prep-session:scheme): purging all calls
  to removed org-babel-ref-variables

* lisp/ob-sqlite.el (org-babel-expand-body:sqlite): purging all calls
  to removed org-babel-ref-variables

  (org-babel-execute:sqlite): purging all calls to removed
  org-babel-ref-variables
Eric Schulte 10 years ago
parent
commit
f16c46c856
6 changed files with 7 additions and 8 deletions
  1. 1 2
      lisp/ob-clojure.el
  2. 1 1
      lisp/ob-gnuplot.el
  3. 1 1
      lisp/ob-ruby.el
  4. 1 1
      lisp/ob-scheme.el
  5. 0 1
      lisp/ob-sh.el
  6. 3 2
      lisp/ob-sqlite.el

+ 1 - 2
lisp/ob-clojure.el

@@ -45,7 +45,6 @@
 (declare-function slime-eval-async "ext:slime" (sexp &optional cont package))
 (declare-function slime-eval "ext:slime" (sexp &optional package))
 (declare-function swank-clojure-concat-paths "ext:slime" (paths))
-(declare-function org-babel-ref-variables "ext:slime" (params))
 (declare-function slime "ext:slime" (&optional command coding-system))
 (declare-function slime-output-buffer "ext:slime" (&optional noprompt))
 (declare-function slime-filter-buffers "ext:slime" (predicate))
@@ -155,7 +154,7 @@ code specifying a variable of the same value."
   "Prepare SESSION according to the header arguments specified in PARAMS."
   (require 'slime) (require 'swank-clojure)
   (let* ((session-buf (org-babel-clojure-initiate-session session))
-         (vars (org-babel-ref-variables params))
+         (vars (mapcar #'cdr (org-babel-get-header params :var)))
          (var-lines (mapcar ;; define any top level session variables
                      (lambda (pair)
                        (format "(def %s %s)\n" (car pair)

+ 1 - 1
lisp/ob-gnuplot.el

@@ -70,7 +70,7 @@ code."
           (org-babel-gnuplot-table-to-data
            (cdr pair) (org-babel-temp-file "gnuplot-") params)
         (cdr pair))))
-   (org-babel-ref-variables params)))
+   (mapcar #'cdr (org-babel-get-header params :var))))
 
 (defun org-babel-expand-body:gnuplot (body params &optional processed-params)
   "Expand BODY according to PARAMS, return the expanded body."

+ 1 - 1
lisp/ob-ruby.el

@@ -86,7 +86,7 @@ This function is called by `org-babel-execute-src-block'."
   "Prepare SESSION according to the header arguments specified in PARAMS."
   ;; (message "params=%S" params) ;; debugging
   (let* ((session (org-babel-ruby-initiate-session session))
-         (vars (org-babel-ref-variables params))
+         (vars (mapcar #'cdr (org-babel-get-header params :var)))
          (var-lines (mapcar ;; define any variables
                      (lambda (pair)
                        (format "%s=%s"

+ 1 - 1
lisp/ob-scheme.el

@@ -104,7 +104,7 @@ This function is called by `org-babel-execute-src-block'"
 (defun org-babel-prep-session:scheme (session params)
   "Prepare SESSION according to the header arguments specified in PARAMS."
   (let* ((session (org-babel-scheme-initiate-session session))
-	 (vars (org-babel-ref-variables params))
+	 (vars (mapcar #'cdr (org-babel-get-header params :var)))
 	 (var-lines
 	  (mapcar
 	   (lambda (var) (format "%S" (print `(define ,(car var) ',(cdr var)))))

+ 0 - 1
lisp/ob-sh.el

@@ -33,7 +33,6 @@
 (require 'shell)
 (eval-when-compile (require 'cl))
 
-(declare-function org-babel-ref-variables "ob-ref" (params))
 (declare-function org-babel-comint-in-buffer "ob-comint" (buffer &rest body))
 (declare-function org-babel-comint-wait-for-output "ob-comint" (buffer))
 (declare-function org-babel-comint-buffer-livep "ob-comint" (buffer))

+ 3 - 2
lisp/ob-sqlite.el

@@ -42,8 +42,9 @@
   "Sqlite specific header args.")
 
 (defun org-babel-expand-body:sqlite (body params &optional processed-params)
+  "Expand BODY according to the values of PARAMS."
   (org-babel-sqlite-expand-vars
-   body (or (nth 1 processed-params) (org-babel-ref-variables params))))
+   body (mapcar #'cdr (org-babel-get-header params :var))))
 
 (defvar org-babel-sqlite3-command "sqlite3")
 
@@ -51,7 +52,7 @@
   "Execute a block of Sqlite code with Babel.
 This function is called by `org-babel-execute-src-block'."
   (let ((result-params (split-string (or (cdr (assoc :results params)) "")))
-	(vars (org-babel-ref-variables params))
+	(vars (org-babel-get-header params :var))
 	(db (cdr (assoc :db params)))
 	(separator (cdr (assoc :separator params)))
 	(nullvalue (cdr (assoc :nullvalue params)))