summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchim Gratz <Stromeko@Stromeko.DE>2013-02-27 23:19:59 +0100
committerAchim Gratz <Stromeko@Stromeko.DE>2013-02-27 23:48:02 +0100
commit302d3780ecc75575b3d09908c6d6acdfed611206 (patch)
tree4f5ea9752c8e2d289d2ece1f44139bec7b410b03
parent0fcfafe331ccc06651613a0c94f90235084f3e1d (diff)
downloadorg-mode-302d3780ecc75575b3d09908c6d6acdfed611206.tar.gz
ob-core: add binding for merged-params to avoid multiple evaluation
* lisp/ob-core.el (org-babel-execute-src-block): Add binding for merged-params to avoid multiple evaluation of `org-babel-merge-paramsĀ“.
-rw-r--r--lisp/ob-core.el10
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 48fb0b4..275a4f7 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -521,15 +521,13 @@ Optionally supply a value for PARAMS which will be merged with
the header arguments specified at the front of the source code
block."
(interactive)
- (let ((info (or info (org-babel-get-src-block-info))))
+ (let* ((info (or info (org-babel-get-src-block-info)))
+ (merged-params (org-babel-merge-params (nth 2 info) params)))
(when (org-babel-confirm-evaluate
- (let ((i info))
- (setf (nth 2 i) (org-babel-merge-params (nth 2 info) params))
- i))
+ (let ((i info)) (setf (nth 2 i) merged-params) i))
(let* ((lang (nth 0 info))
(params (if params
- (org-babel-process-params
- (org-babel-merge-params (nth 2 info) params))
+ (org-babel-process-params merged-params)
(nth 2 info)))
(cache-p (and (not arg) (cdr (assoc :cache params))
(string= "yes" (cdr (assoc :cache params)))))