emacs - 我可以在 org-mode src block 中禁用某些语言的安全确认吗?

标签 emacs org-mode

我已经编写了我自己的用于显示树的小语言 - 它只是 tkiz-qtree 的一些字符串替换。我可以以某种方式禁用该语言的安全问题吗?我正在养成在导出时按 y 6 次的习惯。

最佳答案

org manual 中所写:

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.

因此,如果您信任您的源代码块,只需将此变量设置为 nil

您可以针对您的语言禁用消息:

(defun my-org-confirm-babel-evaluate (lang body)
    (not (string= lang "tkiz")))  ; don't ask for tkiz
(setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)

关于emacs - 我可以在 org-mode src block 中禁用某些语言的安全确认吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12842970/

相关文章:

emacs - org-mode如何在导出时隐藏标签名称

Emacs 组织模式 : textual reference to a file:line

html - 使用 Worg.css ,我的目录被 org-mode 创建的源 block 阻止

c++ - Emacs:CEDET 安装:软件包 assoc 已过时

c++ - 大型项目的 Emacs 教程

sql - 在 Emacs 中,有没有办法从 init.el 以非交互方式调用交互函数?

search - 如何从 emac 中的交互式正则表达式搜索中突出显示以保持突出显示直到停用?

emacs - 组织模式:从稀疏树返回到以前的可见性

emacs - 在议程 View 中匹配属性

Emacs:当前源缓冲区中的函数列表