Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I prevent org-mode from executing all of the babel source blocks?

I have an org file with lots of babel source blocks in it that only need to be re-executed when the code is changed.

How do I prevent org from executing all of the blocks during export? In other words, set them all to manual execution only?

I would prefer a single global option rather than having to edit each block individually.

like image 353
shader Avatar asked Apr 29 '15 19:04

shader


1 Answers

The variable org-export-babel-evaluate, if set to nil, will prevent any code from being evaluated as part of the export process. This way, only the results inserted by way of manual execution will be exported.

You can define it, and others, as a file variable by placing the following comment line at the top of your org file:

# -*- org-export-babel-evaluate: nil -*-

like image 176
Jonathan Jin Avatar answered Sep 23 '22 21:09

Jonathan Jin