org-babel: allow header arg values to be lisp forms.

This allows e.g.

:file (format "%s/images/pca-scatter.png" dir)
This commit is contained in:
Dan Davison 2009-10-27 17:52:01 -04:00 committed by Eric Schulte
parent bf6089d8de
commit 2f05cf41ff
1 changed files with 2 additions and 1 deletions

View File

@ -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)))))