mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-23 07:18:40 +00:00
ob: idempotent code block evaluation and result removal
* lisp/ob.el (org-babel-remove-result): Idempotent code block evaluation and result removal.
This commit is contained in:
parent
bf740ba41c
commit
96ad99ba07
|
@ -1678,8 +1678,9 @@ code ---- the results are extracted in the syntax of the source
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((location (org-babel-where-is-src-block-result nil info)) start)
|
(let ((location (org-babel-where-is-src-block-result nil info)) start)
|
||||||
(when location
|
(when location
|
||||||
|
(setq start (- location 1))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char location) (setq start (point)) (forward-line 1)
|
(goto-char location) (forward-line 1)
|
||||||
(delete-region start (org-babel-result-end))))))
|
(delete-region start (org-babel-result-end))))))
|
||||||
|
|
||||||
(defun org-babel-result-end ()
|
(defun org-babel-result-end ()
|
||||||
|
|
Loading…
Reference in a new issue