summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2013-04-07 12:49:15 (GMT)
committer Eric Schulte <schulte.eric@gmail.com>2013-04-07 12:49:54 (GMT)
commit385ef25c6e8bcd39e5e26b8c390c98dfb08627ea (patch)
tree1230577e8b11fd8f298a321110f47807aa42938f
parent2d6a90229da0526a5fcb7ffd98dc6bf0aae15130 (diff)
downloadorg-mode-385ef25c6e8bcd39e5e26b8c390c98dfb08627ea.zip
org-mode-385ef25c6e8bcd39e5e26b8c390c98dfb08627ea.tar.gz
don't over-evaluate result-params in macro
* lisp/ob-core.el (org-babel-result-cond): Don't over-evaluate result-params in macro.
-rw-r--r--lisp/ob-core.el28
1 files changed, 15 insertions, 13 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index c3d7b0f..8994b81 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2631,19 +2631,21 @@ Emacs shutdown."))
"Call the code to parse raw string results according to RESULT-PARAMS."
(declare (indent 1)
(debug (form form &rest form)))
- `(unless (member "none" ,result-params)
- (if (or (member "scalar" ,result-params)
- (member "verbatim" ,result-params)
- (member "html" ,result-params)
- (member "code" ,result-params)
- (member "pp" ,result-params)
- (and (or (member "output" ,result-params)
- (member "raw" ,result-params)
- (member "org" ,result-params)
- (member "drawer" ,result-params))
- (not (member "table" ,result-params))))
- ,scalar-form
- ,@table-forms)))
+ (org-with-gensyms (params)
+ `(let ((,params ,result-params))
+ (unless (member "none" ,params)
+ (if (or (member "scalar" ,params)
+ (member "verbatim" ,params)
+ (member "html" ,params)
+ (member "code" ,params)
+ (member "pp" ,params)
+ (and (or (member "output" ,params)
+ (member "raw" ,params)
+ (member "org" ,params)
+ (member "drawer" ,params))
+ (not (member "table" ,params))))
+ ,scalar-form
+ ,@table-forms)))))
(def-edebug-spec org-babel-result-cond (form form body))
(defun org-babel-temp-file (prefix &optional suffix)