Browse Source

org-plot: Use consistent method to find table

* lisp/org-plot.el (org-plot/gnuplot): Table information is obtained
using (org-plot/goto-nearest-table), however it was not used when
fetching data from the table.  It is more sensible to use the same
method.  This also now allows a #+plot statement to be placed before
a #+RESULTS line and a table.
TEC 3 năm trước cách đây
mục cha
commit
f72a658bd0
1 tập tin đã thay đổi với 1 bổ sung3 xóa
  1. 1 3
      lisp/org-plot.el

+ 1 - 3
lisp/org-plot.el

@@ -651,9 +651,7 @@ line directly before or after the table."
     ;; collect table and table information
     (let* ((data-file (make-temp-file "org-plot"))
            (table (let ((tbl (save-excursion
-                               ;; needed due to particularities of `org-table-begin'
-                               (when (= (current-column) 0)
-                                 (forward-char 1))
+                               (org-plot/goto-nearest-table)
                                (org-table-to-lisp))))
 		    (when (pcase (plist-get params :transpose)
 			    (`y   t)