summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Davison <davison@stats.ox.ac.uk>2009-10-27 17:52:01 -0400
committerEric Schulte <schulte.eric@gmail.com>2009-11-20 10:42:54 -0700
commit2f05cf41fff897c9ef00b2cb8430dd58c98ca7c4 (patch)
tree38ce98000c3c18cd4753b16b5e574b179e51a38c
parentbf6089d8def7b1c58c9384a609c285bf552a1aea (diff)
downloadorg-mode-2f05cf41fff897c9ef00b2cb8430dd58c98ca7c4.tar.gz
org-babel: allow header arg values to be lisp forms.
This allows e.g. :file (format "%s/images/pca-scatter.png" dir)
-rw-r--r--contrib/babel/lisp/org-babel.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/babel/lisp/org-babel.el b/contrib/babel/lisp/org-babel.el
index 2ceda67..6d27428 100644
--- a/contrib/babel/lisp/org-babel.el
+++ b/contrib/babel/lisp/org-babel.el
@@ -462,7 +462,8 @@ may be specified in the properties of the current outline entry."
(lambda (arg)
(if (string-match "\\([^ \f\t\n\r\v]+\\)[ \f\t\n\r\v]+\\([^ \f\t\n\r\v]+.*\\)" arg)
(cons (intern (concat ":" (match-string 1 arg)))
- (org-babel-chomp (match-string 2 arg)))
+ (let ((raw (org-babel-chomp (match-string 2 arg))))
+ (if (org-babel-number-p raw) raw (eval (org-babel-read raw)))))
(cons (intern (concat ":" arg)) nil)))
(split-string (concat " " arg-string) "[ \f\t\n\r\v]+:" t)))))