1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-21 06:55:35 +00:00

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.
This commit is contained in:
Eric Schulte 2013-05-17 08:49:51 -06:00
parent 1f42ea516a
commit 6e417dd2f5

View File

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