Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2014-11-08 21:40:59 +01:00
commit 3f78abf0b0
1 changed files with 3 additions and 4 deletions

View File

@ -281,8 +281,7 @@ line directly before or after the table."
(delete-other-windows) (delete-other-windows)
(when (get-buffer "*gnuplot*") ;; reset *gnuplot* if it already running (when (get-buffer "*gnuplot*") ;; reset *gnuplot* if it already running
(with-current-buffer "*gnuplot*" (with-current-buffer "*gnuplot*"
(goto-char (point-max)) (goto-char (point-max))))
(gnuplot-delchar-or-maybe-eof nil)))
(org-plot/goto-nearest-table) (org-plot/goto-nearest-table)
;; set default options ;; set default options
(mapc (mapc
@ -295,6 +294,7 @@ line directly before or after the table."
(table (org-table-to-lisp)) (table (org-table-to-lisp))
(num-cols (length (if (eq (first table) 'hline) (second table) (num-cols (length (if (eq (first table) 'hline) (second table)
(first table))))) (first table)))))
(run-with-idle-timer 0.1 nil #'delete-file data-file)
(while (equal 'hline (first table)) (setf table (cdr table))) (while (equal 'hline (first table)) (setf table (cdr table)))
(when (equal (second table) 'hline) (when (equal (second table) 'hline)
(setf params (plist-put params :labels (first table))) ;; headers to labels (setf params (plist-put params :labels (first table))) ;; headers to labels
@ -345,8 +345,7 @@ line directly before or after the table."
(gnuplot-mode) (gnuplot-mode)
(gnuplot-send-buffer-to-gnuplot)) (gnuplot-send-buffer-to-gnuplot))
;; cleanup ;; cleanup
(bury-buffer (get-buffer "*gnuplot*")) (bury-buffer (get-buffer "*gnuplot*")))))
(run-with-idle-timer 0.1 nil (lambda () (delete-file data-file))))))
(provide 'org-plot) (provide 'org-plot)