I know you can use org-babel-execute-src-block
(C-c C-c
) to execute individual code blocks, but is there something akin to "Run all chunks above" that RStudio has for Rmarkdown files?
You can easily run all code blocks via C-c C-v C-b
, or all blocks in a subtree. I don't think above this point is implemented.
It would be fairly easy write a custom function that takes all text below the point, hides it, executes all code blocks, and then restores the text. I would do that rather than taking all text above the point and executing it in a temporary buffer, because some code blocks may use the buffer-name or file-name so it should not be changed.
-
1Note: Because of
<< noweb >>
remote code inclusion, it may be difficult to know that blocks above don't depend on blocks below. – mankoff Jan 23 '20 at 12:37