emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org c70a422082: org-babel-execute-src-block: Ensure tha


From: ELPA Syncer
Subject: [elpa] externals/org c70a422082: org-babel-execute-src-block: Ensure that buffer is not changed
Date: Sat, 29 Oct 2022 00:58:04 -0400 (EDT)

branch: externals/org
commit c70a422082eca3545adc73ba4905360bb6d371b7
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    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
---
 lisp/ob-core.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 518831ec69..a2550f269a 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -805,7 +805,7 @@ guess will be made."
                          (format "at position %d" (nth 5 info)))))
            (setq exec-start-time (current-time)
                   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)
                             (or (member "vector" result-params)
                                 (member "table" result-params))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]