emacs - 在 babel-execute-subtree 中运行多个 block 而不回答 yes

标签 emacs org-mode org-babel

通过调用 M-x org-babel-execute-subtree 从 org 模式运行源代码

我必须用“y”响应每个代码块

如何将其配置为默认“y”运行

最佳答案

评估

      (setq org-confirm-babel-evaluate nil)

如果您确实想始终跳过此步骤,则必须将上述表单添加到初始化文件中。

这是变量的文档字符串:

Documentation:

Confirm before evaluation.

Require confirmation before interactively evaluating code blocks in Org buffers. The default value of this variable is t, meaning confirmation is required for any code block evaluation. This variable can be set to nil to inhibit any future confirmation requests. This variable can also be set to a function which takes two arguments the language of the code block and the body of the code block. Such a function should then return a non-nil value if the user should be prompted for execution or nil if no prompt is required.

Warning: Disabling confirmation may result in accidental evaluation of potentially harmful code. It may be advisable remove code block execution from ‘C-c C-c’ as further protection against accidental code block evaluation. The ‘org-babel-no-eval-on-ctrl-c-ctrl-c’ variable can be used to remove code block execution from the ‘C-c C-c’ keybinding.

You can customize this variable.

您至少应该了解该警告。

关于emacs - 在 babel-execute-subtree 中运行多个 block 而不回答 yes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56752449/

相关文章:

emacs - 如何在 emacs 中重新对齐文本表的列?

emacs - 组织模式:保护重点

emacs - 有什么方法可以让 org-babel 正确缩进 noweb 纠结的代码吗?

emacs - 如何使用 Emacs 编写具有适当缩进、行长和换行的注释?

emacs 23.1 windows find-grep

emacs - emacs evil-mode 中 ex 命令的键映射

emacs - 如何标记组织模式 src block 结果?

r - 使用 org-mode 构建分析

emacs - org-babel 中的 noweb 样式编织

emacs - 组织模式源 block 可见性循环