Browse Source

babel: emacs-lisp no longer evaluates header argument references multiple times

* lisp/babel/langs/ob-emacs-lisp.el
  (org-babel-expand-body:emacs-lisp): removed extra call to
  `org-babel-process-params' which was causing referenced code blocks
  to be run multiple times

  (org-babel-execute:emacs-lisp): now passing processed-params through
  to `org-babel-expand-body:emacs-lisp' which keeps references from
  being evaluated multiple times
Eric Schulte 14 years ago
parent
commit
a969714755
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lisp/babel/langs/ob-emacs-lisp.el

+ 2 - 2
lisp/babel/langs/ob-emacs-lisp.el

@@ -45,7 +45,6 @@
   "Expand BODY according to PARAMS, return the expanded body."
   (let* ((processed-params (or processed-params (org-babel-process-params params)))
          (vars (nth 1 processed-params))
-         (processed-params (org-babel-process-params params))
          (result-params (nth 2 processed-params))
          (print-level nil) (print-length nil)
          (body (if (> (length vars) 0)
@@ -66,7 +65,8 @@
     (let ((processed-params (org-babel-process-params params)))
       (org-babel-reassemble-table
        (eval (read (format "(progn %s)"
-			   (org-babel-expand-body:emacs-lisp body params))))
+			   (org-babel-expand-body:emacs-lisp
+			    body params processed-params))))
        (org-babel-pick-name (nth 4 processed-params) (cdr (assoc :colnames params)))
        (org-babel-pick-name (nth 5 processed-params) (cdr (assoc :rownames params)))))))