forked from mirrors/org-mode
org-babel-execute-src-block: Ensure that buffer is not changed
* lisp/ob-core.el (org-babel-execute-src-block): Ensure that we insert results into the buffer where the src block is located. Even when the execution yields changing current buffer. Reported-by: John Kitchin <jkitchin@andrew.cmu.edu> Link: https://orgmode.org/list/CAJ51ETqMBqiHy+W3CZ+EtSPzVb1ihbX6v+NQsZKojN6jF8zoBQ@mail.gmail.com
This commit is contained in:
parent
a51bb2c448
commit
c70a422082
|
@ -805,7 +805,7 @@ guess will be made."
|
||||||
(format "at position %d" (nth 5 info)))))
|
(format "at position %d" (nth 5 info)))))
|
||||||
(setq exec-start-time (current-time)
|
(setq exec-start-time (current-time)
|
||||||
result
|
result
|
||||||
(let ((r (funcall cmd body params)))
|
(let ((r (save-current-buffer (funcall cmd body params))))
|
||||||
(if (and (eq (cdr (assq :result-type params)) 'value)
|
(if (and (eq (cdr (assq :result-type params)) 'value)
|
||||||
(or (member "vector" result-params)
|
(or (member "vector" result-params)
|
||||||
(member "table" result-params))
|
(member "table" result-params))
|
||||||
|
|
Loading…
Reference in a new issue