Comments (3)
Off the top of my head, we might be able to add a new function like ob-async-execute-subtree
which adds a function to org-babel-after-execute-hook
and kicks off the first src-block. The hook function would then jump to the next src-block and execute it.
Open to ideas or pull requests, here.
from ob-async.
Without async mode, you could achieve something like this by defining blocks as inputs of other blocks, e.g.:
* Test
#+begin_src emacs-lisp :results none
(setq-local org-confirm-babel-evaluate nil)
#+end_src
#+name: test1
#+begin_src sh :results verbatim :cache yes
sleep 3
echo test 1
date -u
#+end_src
#+begin_src sh :results verbatim :var ignore=test1 :cache yes
date -u
echo test 2
#+end_src
The second block will wait for the first block to complete, perhaps implicitly because evaluation is blocking (I don't know) but the effect is the same: this works.
With ob-async, it seems like a block is immediately considered "done" from babel's pov, so the next block will start immediately, with the first (place-holder) result as input. An error is thrown and the second block never completes:
error in process sentinel: if: Invalid read syntax: "#<"
error in process sentinel: Invalid read syntax: "#<"
If ob-async could somehow detect that an input block is, itself, a pending ob-async operation, and block evaluation until that dependent block is done, you could fix both the expected behaviour, and this github issue could be solved by using the same technique.
What do you think?
from ob-async.
Related to #60
from ob-async.
Related Issues (20)
- error in process sentinel: async-when-done: Invalid read syntax: "#"
- Calls to second emacs process seems to fail HOT 4
- error in process sentinel: Cannot open load file: No such file or directory, org-version.el HOT 1
- ob-async doesn't support :var HOT 3
- async can't work HOT 3
- bash src blocks with :results raw not working any more HOT 2
- ob-async does not work with latest Org Mode on "master" branch HOT 1
- org-babel-python-command is ignored HOT 4
- ob-async does not seem to support ob-ref HOT 7
- Can't exec ob-async due to `error in process sentinel: async-handle-result: Invalid read syntax: "#"` HOT 4
- Org babel exports results HOT 1
- Errors in code evaluation are not reported on screen
- Consider integrating into mainline org repo? HOT 2
- org-babel-execute-src-block added one more argument
- presented example is not working HOT 4
- error in process sentinel: async-when-done: Recursive ‘require’ for feature ‘cl-lib’
- Async blocks fail when called from a table formula with org-sbe
- emacs 29.1 breaks async blocks HOT 8
- :noweb yes breaking ob-async with error in process sentinel: Invalid read syntax: "#"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ob-async.