Browse Source

org-plot: Fix empty cells handling

* lisp/org-plot.el (org-plot/gnuplot-script): Fix empty cells
  handling.

Reported-by: Anders Wirzenius <anders.wirzenius@netikka.fi>
<http://permalink.gmane.org/gmane.emacs.orgmode/96022>
Nicolas Goaziou 4 years ago
parent
commit
4d7772c6a4
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lisp/org-plot.el

+ 3 - 0
lisp/org-plot.el

@@ -220,6 +220,9 @@ manner suitable for prepending to a user-specified script."
     (when title (funcall ats (format "set title '%s'" title))) ; title
     (mapc ats lines)					       ; line
     (dolist (el sets) (funcall ats (format "set %s" el)))      ; set
+    ;; Unless specified otherwise, values are TAB separated.
+    (unless (org-string-match-p "^set datafile separator" script)
+      (funcall ats "set datafile separator \"\\t\""))
     (when x-labels			; x labels (xtics)
       (funcall ats
 	       (format "set xtics (%s)"