Closed f4nyc closed 3 years ago
@f4nyc clever, and thanks for the contribution! Mind adding a unit test to prevent regressions?
A single test that execute an :async
block and uses a ref should suffice. Here's a sort-of similar test for inspiration:
@f4nyc looks good, thanks for the contribution!
@f4nyc Is this working for you? With the following example,
#+begin_src sh :async
sleep 3s && echo "Done!"
#+end_src
I get
error in process sentinel: async-handle-result: Symbol’s function definition is void: org-babel-execute:sh
error in process sentinel: Symbol’s function definition is void: org-babel-execute:sh
#+begin_src emacs-lisp
(functionp 'org-babel-execute:sh)
#+end_src
#+RESULTS:
: t
@noorul Yes, the commit has passed CI tests which also includes this case. Could you execute this
#+begin_src emacs-lisp :async
(functionp 'org-babel-execute:sh)
#+end_src
For the above snippet, I get the following:
async-handle-result: Symbol’s function definition is void: org-babel-execute:emacs-lisp
@astahlman I ran into the same problem as @noorul but only after switching from an emacsforosx build of emacs 27 to a windows machine running emacs 26.3 under WSL2. I found a solution last night, by editing ob-async-org-babel-execute-src-block
in ob-aync.el to add the following forms after ,(async-inject-variables ob-async-inject-variables)
:
(package-initialize)
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(shell . t)
(perl . t)
(python . t)
(ruby . t)
(restclient . t)
(sql . t)))
@spacebat Thank you for the hint. Looks like delayed evaluation of (use-package ob-async)
has made it work for me.
Add org-babel-async-content to pass current buffer