org-babel-do-in-edit-buffer: Fix when opening src edit buffer fails
* lisp/ob-core.el (org-babel-do-in-edit-buffer): When opening src edit buffer fails, do not leave point inside that buffer. Reported-by: gerard.vermeulen@posteo.net Link: https://orgmode.org/list/5bf6832d2485f0aa6be2e5ea2eba37d2@posteo.net
This commit is contained in:
parent
8ac99c33f0
commit
5f5db3d353
|
@ -1198,8 +1198,10 @@ Return t if a code block was found at point, nil otherwise."
|
|||
(when (and (org-babel-where-is-src-block-head element)
|
||||
(condition-case nil
|
||||
(org-edit-src-code)
|
||||
(t (when outside-position (goto-char outside-position))
|
||||
nil)))
|
||||
(t
|
||||
(org-edit-src-exit)
|
||||
(when outside-position (goto-char outside-position))
|
||||
nil)))
|
||||
(unwind-protect (progn ,@body)
|
||||
(org-edit-src-exit)
|
||||
(when outside-position (goto-char outside-position)))
|
||||
|
|
Loading…
Reference in New Issue