I use org mode for reproducible research and literate programming, mostly using R for computing. I am new to emacs.
If I start a new R session or my session is interrupted, I will have to re-run some code snippets. This is very easy with speed commands (entering "e" to evaluate a piece, then "n" to go to the next). I like this feature, the only problem is that my headers and subtrees then expand and I have to close them again so that the page is neat.
Is there an existing function or lisp expression for evaluating all code fragments under the heading? And can this be done without expanding the content below?
many thanks
For example, if the cursor was at the beginning of heading 1, could you evaluate the code fragments under headings 2 and 3 with a single command?
* header 1
** header 2
print("hello")
** header 3
print("world")
source
share