org-babel-execute-src-block: Handle code block moving point
* lisp/ob-core.el (org-babel-execute-src-block): Make sure that point remain on src block after evaluation. The function logic later implicitly assumes that the point is on the block that has been evaluated.
This commit is contained in:
parent
3e4c89e556
commit
a0950e9432
|
@ -893,7 +893,11 @@ guess will be made."
|
|||
(format "at position %S" (nth 5 info)))))
|
||||
(setq exec-start-time (current-time)
|
||||
result
|
||||
(let ((r (save-current-buffer (funcall cmd body params))))
|
||||
(let ((r
|
||||
;; Code block may move point in the buffer.
|
||||
;; Make sure that the point remains on the
|
||||
;; code block.
|
||||
(save-excursion (funcall cmd body params))))
|
||||
(if (and (eq (cdr (assq :result-type params)) 'value)
|
||||
(or (member "vector" result-params)
|
||||
(member "table" result-params))
|
||||
|
|
Loading…
Reference in New Issue