`org-babel-do-in-edit-buffer': more lightweight test of context
* ob.el (org-babel-do-in-edit-buffer): Use `org-babel-where-is-src-block-head' to test for source block at point.
This commit is contained in:
parent
ad1ab9d419
commit
0e1ff9ddbc
|
@ -510,7 +510,8 @@ with a prefix argument then this is passed on to
|
|||
"Evaluate BODY in edit buffer if there is a code block at point.
|
||||
Return t if a code block was found at point, nil otherwise."
|
||||
`(let ((org-src-window-setup 'switch-invisibly))
|
||||
(when (org-edit-src-code nil nil nil 'quietly)
|
||||
(when (and (org-babel-where-is-src-block-head)
|
||||
(org-edit-src-code nil nil nil 'quietly))
|
||||
(unwind-protect (progn ,@body)
|
||||
(if (org-bound-and-true-p org-edit-src-from-org-mode)
|
||||
(org-edit-src-exit)))
|
||||
|
|
Loading…
Reference in New Issue