forked from mirrors/org-mode
org-plot: Fix calling at start of #+plot line
* lisp/org-plot.el (org-plot/gnuplot): When called with point at the start of the #+plot: line, the behaviour of `org-table-begin' (called in `org-table-to-lisp') caused no table to be detected. To work around this, when the point is at the zeroth column, it is temporarily shifted one character to the right.
This commit is contained in:
parent
7dd667af67
commit
2ae308342a
|
@ -650,7 +650,11 @@ line directly before or after the table."
|
|||
(setf params (org-plot/collect-options params))))
|
||||
;; collect table and table information
|
||||
(let* ((data-file (make-temp-file "org-plot"))
|
||||
(table (let ((tbl (org-table-to-lisp)))
|
||||
(table (let ((tbl (save-excursion
|
||||
;; needed due to particularities of `org-table-begin'
|
||||
(when (= (current-column) 0)
|
||||
(forward-char 1))
|
||||
(org-table-to-lisp))))
|
||||
(when (pcase (plist-get params :transpose)
|
||||
(`y t)
|
||||
(`yes t)
|
||||
|
|
Loading…
Reference in New Issue