diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2013-05-17 08:49:51 -0600 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2013-05-17 08:51:35 -0600 |
commit | 6e417dd2f5cba5850e39612dd965dc2373ef6be6 (patch) | |
tree | 892eb6b98f01cc8791d25b18e1347bc66cf0955c | |
parent | 1f42ea516ab47753877d58708a327268682bb7ac (diff) | |
download | org-mode-6e417dd2f5cba5850e39612dd965dc2373ef6be6.tar.gz |
improved gnuplot handling of special header args
Both declare them, and then actually retrieve them from the params
association list (which is not a p list).
* lisp/ob-gnuplot.el (org-babel-header-args:gnuplot): Declare them.
(org-babel-expand-body:gnuplot): Params is an alist not a plist.
-rw-r--r-- | lisp/ob-gnuplot.el | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el index 93461e5..865cb48 100644 --- a/lisp/ob-gnuplot.el +++ b/lisp/ob-gnuplot.el @@ -53,7 +53,14 @@ "Default arguments to use when evaluating a gnuplot source block.") (defvar org-babel-header-args:gnuplot - '((missing . :any)) + '((title . :any) + (lines . :any) + (sets . :any) + (x-labels . :any) + (y-labels . :any) + (timefmt . :any) + (time-ind . :any) + (missing . :any)) "Gnuplot specific header args.") (defvar org-babel-gnuplot-timestamp-fmt nil) @@ -84,13 +91,13 @@ code." (term (or (cdr (assoc :term params)) (when out-file (file-name-extension out-file)))) (cmdline (cdr (assoc :cmdline params))) - (title (plist-get params :title)) - (lines (plist-get params :line)) - (sets (plist-get params :set)) - (x-labels (plist-get params :xlabels)) - (y-labels (plist-get params :ylabels)) - (timefmt (plist-get params :timefmt)) - (time-ind (or (plist-get params :timeind) + (title (cdr (assoc :title params))) + (lines (cdr (assoc :line params))) + (sets (cdr (assoc :set params))) + (x-labels (cdr (assoc :xlabels params))) + (y-labels (cdr (assoc :ylabels params))) + (timefmt (cdr (assoc :timefmt params))) + (time-ind (or (cdr (assoc :timeind params)) (when timefmt 1))) (missing (cdr (assoc :missing params))) (add-to-body (lambda (text) (setq body (concat text "\n" body)))) |