在 Emacs 组织模式中设置本地文件变量 [英] Setting a local file variable in Emacs org-mode
问题描述
在特定的组织模式文件中,我不希望标签被继承.我认为将 -*- org-use-tag-inheritance: nil
放在第一行可以解决问题,但这似乎不起作用.如果没有手动执行 setq
语句,我该如何实现?
In a particular org-mode file, I do not want tags to be inherited. I thought putting -*- org-use-tag-inheritance: nil
for the first line would do the trick, but that doesn't seem to be working. Short of manually executing a setq
statement, how can I make this happen?
推荐答案
标题注释中缺少尾随 -*-
.
You're missing a trailing -*-
in the header comment.
试试这个:
# -*- org-use-tag-inheritance: nil; -*-
n.b.很容易检查局部变量是否真的按照你期望的方式设置——只需对有问题的 VAR 使用 Ch v VAR
,Emacs 会告诉你它是否有缓冲区局部值.
n.b. It's easy to check whether local variables were actually set the way you expected -- just use C-h v VAR
for the VAR in question, and Emacs tells you if it has a buffer-local value.
这篇关于在 Emacs 组织模式中设置本地文件变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!