|
@@ -64,7 +64,7 @@
|
|
|
(term . :any))
|
|
|
"Gnuplot specific header args.")
|
|
|
|
|
|
-(defvar org-babel-gnuplot-timestamp-fmt nil)
|
|
|
+(defvar org-babel-gnuplot-timestamp-fmt nil) ; Dynamically scoped.
|
|
|
|
|
|
(defvar *org-babel-gnuplot-missing* nil)
|
|
|
|
|
@@ -264,15 +264,13 @@ then create one. Return the initialized session. The current
|
|
|
"Export TABLE to DATA-FILE in a format readable by gnuplot.
|
|
|
Pass PARAMS through to `orgtbl-to-generic' when exporting TABLE."
|
|
|
(with-temp-file data-file
|
|
|
- (make-local-variable 'org-babel-gnuplot-timestamp-fmt)
|
|
|
- (setq org-babel-gnuplot-timestamp-fmt (or
|
|
|
- (plist-get params :timefmt)
|
|
|
- "%Y-%m-%d-%H:%M:%S"))
|
|
|
- (insert (orgtbl-to-generic
|
|
|
- table
|
|
|
- (org-combine-plists
|
|
|
- '(:sep "\t" :fmt org-babel-gnuplot-quote-tsv-field)
|
|
|
- params))))
|
|
|
+ (insert (let ((org-babel-gnuplot-timestamp-fmt
|
|
|
+ (or (plist-get params :timefmt) "%Y-%m-%d-%H:%M:%S")))
|
|
|
+ (orgtbl-to-generic
|
|
|
+ table
|
|
|
+ (org-combine-plists
|
|
|
+ '(:sep "\t" :fmt org-babel-gnuplot-quote-tsv-field)
|
|
|
+ params)))))
|
|
|
data-file)
|
|
|
|
|
|
(provide 'ob-gnuplot)
|