Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ob-async.el
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ block."
(setq exec-path ',exec-path)
(setq load-path ',load-path)
;; setq any variables that are prefixed with "org-babel-"
,(async-inject-variables "\\borg-babel.+")
,(async-inject-variables "\\borg-babel.+" nil "^org-babel-hide-result-overlays$")
(package-initialize)
(setq ob-async-pre-execute-src-block-hook ',ob-async-pre-execute-src-block-hook)
(run-hooks 'ob-async-pre-execute-src-block-hook)
Expand Down
17 changes: 17 additions & 0 deletions test/ob-async-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -442,3 +442,20 @@ inherited by the async subprocess"
(ctrl-c-ctrl-c-with-callbacks
:pre (should (placeholder-p (results-block-contents)))
:post (should (string= "I should be set!" (results-block-contents)))))))))

(ert-deftest test-org-babel-hide-result-overlays-suppressed ()
"Test that org-babel-hide-result-overlays is not inherited by
the async subprocess"
(let* ((uuid (ob-async--generate-uuid))
(buffer-contents "
#+BEGIN_SRC emacs-lisp :async
org-babel-hide-result-overlays
#+END_SRC"))
(unwind-protect
(progn
(with-buffer-contents buffer-contents
(setq org-babel-hide-result-overlays (list (make-overlay 1 1)))
(org-babel-next-src-block)
(ctrl-c-ctrl-c-with-callbacks
:pre (should (placeholder-p (results-block-contents)))
:post (should (string= "nil" (results-block-contents)))))))))