I have some shell code that can be dangerous to run on local machine in a org-mode source code block. Globally, I have configured org-mode to prompt for execution, but I would still like to make sure that these blocks will NEVER be executed with per-block configuration.


To explicitly disable certain org-mode code blocks from execution, add :eval no or :noeval in the code block header line. See the example below:

#+begin_src bash :noeval
sudo rm -rf /

When doing C-c C-c to attempt to run the code, the following message is produced:

Evaluation of this bash code block is disabled.

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.