We’ll use `org-babel-execute-subtree` bound to C-c C-v s by default to run the following two headings.
# let's make an STDERR here
echo THIS ISNT JSON | jq .
These code blocks will run one after another. Also, while running, emacs will be frozen / blocked. So this will take about 10 seconds.
We can also add :sync t
as a beginsrc code block argument. Though it is the default, AND is set in our inherited PROPERTIES drawer.
date
sleep 5
date
date
date
sleep 1
date
date
sleep 3
date
date
sleep 2
date
These code blocks will start almost at the same time, and run in the background.
We can also add :async t
as a beginsrc code block argument. Though it is the default
date
sleep 5
date
Thu Jul 28 10:31:23 AM MDT 2022
Thu Jul 28 10:31:28 AM MDT 2022
date
Thu Jul 28 10:31:23 AM MDT 2022
date
sleep 1
date
Thu Jul 28 10:31:23 AM MDT 2022
Thu Jul 28 10:31:24 AM MDT 2022
date
sleep 3
date
Thu Jul 28 10:31:23 AM MDT 2022
Thu Jul 28 10:31:26 AM MDT 2022
date
sleep 2
date
Thu Jul 28 10:31:23 AM MDT 2022
Thu Jul 28 10:31:25 AM MDT 2022
#+name jsonstuff
kubectl get node ii-control-plane-pmscp -o json | jq .metadata.annotations
date
echo Sleeping $seconds seconds
sleep $seconds
date
Thu Jul 28 10:04:18 AM MDT 2022
Sleeping 2 seconds
Thu Jul 28 10:04:20 AM MDT 2022
f1b42636d3a2457759d0b8b56aab8e23
Also results in No org-babel-execute function for nosleep! messages.
Maybe due to the way ob-async spawn another emacs… without the context of this buffer and it’s other named code blocks. OR something else I’m missing.
Thu Jul 28 09:48:31 AM MDT 2022
Sleeping 1 seconds
Thu Jul 28 09:48:32 AM MDT 2022
Thu Jul 28 09:48:46 AM MDT 2022
Sleeping 2 seconds
Thu Jul 28 09:48:48 AM MDT 2022