Browse Source

only wrap gnuplot data values in " when necessary

* lisp/ob-gnuplot.el (org-babel-gnuplot-quote-tsv-field): Only wrap
  gnuplot data values in " when necessary.
Eric Schulte 12 years ago
parent
commit
0194fd0cdc
1 changed files with 4 additions and 2 deletions
  1. 4 2
      lisp/ob-gnuplot.el

+ 4 - 2
lisp/ob-gnuplot.el

@@ -234,8 +234,10 @@ then create one.  Return the initialized session.  The current
 	(org-babel-gnuplot-quote-timestamp-field s)
       (if (zerop (length s))
 	  (or *org-babel-gnuplot-missing* s)
-	(concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"")
-		"\"")))))
+	(if (string-match "[ \"]" "?")
+	    (concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"")
+		    "\"")
+	  s)))))
 
 (defun org-babel-gnuplot-table-to-data (table data-file params)
   "Export TABLE to DATA-FILE in a format readable by gnuplot.