Browse Source

Merge branch 'maint'

Nicolas Goaziou 11 năm trước cách đây
mục cha
commit
3f78abf0b0
1 tập tin đã thay đổi với 3 bổ sung4 xóa
  1. 3 4
      lisp/org-plot.el

+ 3 - 4
lisp/org-plot.el

@@ -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))
-	(gnuplot-delchar-or-maybe-eof nil)))
+	(goto-char (point-max))))
     (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*"))
-      (run-with-idle-timer 0.1 nil (lambda () (delete-file data-file))))))
+      (bury-buffer (get-buffer "*gnuplot*")))))
 
 
 (provide 'org-plot)
 (provide 'org-plot)