branch: externals/org
commit f72a658bd057e953a1cdb6f3230b8caae2560d80
Author: TEC <t...@tecosaur.com>
Commit: TEC <t...@tecosaur.com>

    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.
---
 lisp/org-plot.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lisp/org-plot.el b/lisp/org-plot.el
index 54c06d6..0e5032b 100644
--- a/lisp/org-plot.el
+++ b/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)

Reply via email to