I have an org document that contains a lot of source code snippets in it. I want the results of the code to be exported when exporting to Html. On export Emacs asks me if I want to evaluate the code block on my system once for every bit of source code. This is a lot of questions.

Is there any way to stop Emacs for asking for confirmation every time?

The exact message is

"Evaluate this goban code block on your system? (y or n)"

Note goban is the babel language I am exporting. (It is actually an image of a go board).


From the documentation:

Source code blocks

Source code blocks can be evaluated during export, or when pressing ‘C-c C-c’ in the block. The most important thing to realize here is that Org mode files which contain code snippets are, in a certain sense, like executable files. So you should accept them and load them into Emacs only from trusted sources—just like you would do with a program you install on your computer.

Make sure you know what you are doing before customizing the variables which take off the default security brakes.

-- User Option: org-confirm-babel-evaluate
      When t (the default), the user is asked before every code
      block evaluation.  When ‘nil’, the user is not asked.  When
      set to a function, it is called with two arguments (language
      and body of the code block) and should return t to ask and
      ‘nil’ not to ask.

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.