1

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?

1

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.

| improve this answer | |
  • Note: Because of << noweb >> remote code inclusion, it may be difficult to know that blocks above don't depend on blocks below. – mankoff Jan 23 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.