I want to turn of the security confirmation for the R language, as described here: http://orgmode.org/manual/Code-evaluation-security.html

So I tried putting the following code in the dotspacemacs/user-config () section of my .spacemacs:

(defun my-org-confirm-babel-evaluate (lang body)
            (not (string= lang "R")))  
          (setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)

This doesn't have any effect.

If I try to customize-varibale as elaborated on the link above, org-confirm-babel-evaluate, I always get an error saying that the function is invalid. I have tried combinations with and without the the setq command and with and without the brackets around the function.

I can turn off the org-confirm-babel-evaluate variable for all code blocks, and it works too, but that's not the ideal case as now any code block of any language would be executed.

Also, how would I add an additional language (say python) to the function above.

Any ideas?

I am new to emacs and am using the following version of spacemacs. Using: 0.200.7@25.1.1 (spacemacs)

Your Answer

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

Browse other questions tagged or ask your own question.