ob: compute correct end position when results are a list
* lisp/ob.el (org-babel-result-end): end position is end of current sublist instead of bottom point, as results might be inserted in a list themselves.
This commit is contained in:
parent
c82805fc57
commit
b219690f05
|
@ -77,7 +77,8 @@
|
||||||
(declare-function org-list-parse-list "org-list" (&optional delete))
|
(declare-function org-list-parse-list "org-list" (&optional delete))
|
||||||
(declare-function org-list-to-generic "org-list" (LIST PARAMS))
|
(declare-function org-list-to-generic "org-list" (LIST PARAMS))
|
||||||
(declare-function org-list-struct "org-list" ())
|
(declare-function org-list-struct "org-list" ())
|
||||||
(declare-function org-list-get-bottom-point "org-list" (struct))
|
(declare-function org-list-struct-prev-alist "org-list" (struct))
|
||||||
|
(declare-function org-list-get-list-end "org-list" (item struct prevs))
|
||||||
|
|
||||||
(defgroup org-babel nil
|
(defgroup org-babel nil
|
||||||
"Code block evaluation and management in `org-mode' documents."
|
"Code block evaluation and management in `org-mode' documents."
|
||||||
|
@ -1583,9 +1584,9 @@ code ---- the results are extracted in the syntax of the source
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(cond
|
(cond
|
||||||
((org-at-table-p) (progn (goto-char (org-table-end)) (point)))
|
((org-at-table-p) (progn (goto-char (org-table-end)) (point)))
|
||||||
((org-at-item-p) (save-excursion
|
((org-at-item-p) (let* ((struct (org-list-struct))
|
||||||
(org-beginning-of-item)
|
(prevs (org-list-struct-prev-alist struct)))
|
||||||
(1- (org-list-get-bottom-point (org-list-struct)))))
|
(org-list-get-list-end (point-at-bol) struct prevs)))
|
||||||
(t
|
(t
|
||||||
(let ((case-fold-search t)
|
(let ((case-fold-search t)
|
||||||
(blocks-re (regexp-opt
|
(blocks-re (regexp-opt
|
||||||
|
|
Loading…
Reference in New Issue