如何在 emacs org 模式下设置变量值?
How do I set a variable value in emacs org mode?
org-mode 教程经常谈到设置变量的值来改变模式的行为。例如,在 this org-mode tutorial:
This warning is deactivated if the task gets scheduled and you set org-agenda-skip-deadline-prewarning-if-scheduled to t.
我已经搜索了一段时间,但看起来知道如何设置 emacs 变量值是许多教程中的假定知识。
有人可以教我如何以及在何处设置组织模式中的变量吗?它是在 .emacs 文件中设置还是在每个 org 文件中设置?这些问题是否有意义,或者我是否遗漏了一些重要的概念?
非常感谢!
自定义
如果你需要一些关于变量的帮助,你可以使用 C-h v
然后 Emacs 会问你变量名。
在那里如果你输入 org-agenda-skip-deadline-prewarning-if-scheduled
你会看到一个带有变量的缓冲区
描述。最后您会看到一个可点击的 customize。单击它,您将看到一个交互式缓冲区,您可以从中更改变量值(保存在 .emacs
文件中)。
注:可以直接用M-x customize-option
+变量名
用setq
lisp函数:
另一种方法是直接使用这个:
(setq org-agenda-skip-deadline-prewarning-if-scheduled t)
- 在您的
.emacs
文件中或
- 在
*scratch*
缓冲区中,然后M-x eval-buffer
(您的修改是即时的,但未保存。)
org-mode 教程经常谈到设置变量的值来改变模式的行为。例如,在 this org-mode tutorial:
This warning is deactivated if the task gets scheduled and you set org-agenda-skip-deadline-prewarning-if-scheduled to t.
我已经搜索了一段时间,但看起来知道如何设置 emacs 变量值是许多教程中的假定知识。
有人可以教我如何以及在何处设置组织模式中的变量吗?它是在 .emacs 文件中设置还是在每个 org 文件中设置?这些问题是否有意义,或者我是否遗漏了一些重要的概念?
非常感谢!
自定义
如果你需要一些关于变量的帮助,你可以使用 C-h v
然后 Emacs 会问你变量名。
在那里如果你输入 org-agenda-skip-deadline-prewarning-if-scheduled
你会看到一个带有变量的缓冲区
描述。最后您会看到一个可点击的 customize。单击它,您将看到一个交互式缓冲区,您可以从中更改变量值(保存在 .emacs
文件中)。
注:可以直接用M-x customize-option
+变量名
用setq
lisp函数:
另一种方法是直接使用这个:
(setq org-agenda-skip-deadline-prewarning-if-scheduled t)
- 在您的
.emacs
文件中或 - 在
*scratch*
缓冲区中,然后M-x eval-buffer
(您的修改是即时的,但未保存。)