How to evaluate all code blocks when exporting in emacs org-mode

无人久伴 提交于 2019-12-04 18:57:13

问题


I have an org-mode document with many different R source code blocks. Whenever I hit C-c C-e and export to PDF or HTML I get a different prompt asking to evaluate each code block. This wasn't a big deal, but now I have to type yes 20+ times. Is there an option to automatically evaluate all the code blocks?


回答1:


I think this is what you want:

(setq org-confirm-babel-evaluate nil)



回答2:


Put the following line at the top of your file, that way you get asked one time upon opening it, and the safer non-evaluating default remains true for other files

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


来源:https://stackoverflow.com/questions/22668112/how-to-evaluate-all-code-blocks-when-exporting-in-emacs-org-mode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!