如何在emacs组织模式中设置变量值?

时间:2017-12-20 20:19:45

标签: variables emacs org-mode

组织模式教程经常谈到设置变量的值来改变模式的行为。例如,在this org-mode tutorial中:

  

如果任务已安排,并且您将org-agenda-skip-deadline-prewarning-if-scheduled设置为t ,则会停用此警告。

我一直在寻找一段时间,但看起来知道如何设置emacs变量值是许多教程中的假定知识。

有人可以教我如何在组织模式中设置变量吗?是在.emacs文件中还是在每个组织文件中设置?这些问题甚至有意义还是我错过了一些重要的概念?

非常感谢!

1 个答案:

答案 0 :(得分:2)

使用自定义

如果您需要有关变量的帮助,可以使用org-agenda-skip-deadline-prewarning-if-scheduled,然后Emacs会询问变量名称。

如果你输入.emacs,你会看到一个带变量的缓冲区 描述。最后,您会看到可点击的自定义。单击它,您将看到一个交互式缓冲区,您可以从中更改变量值(保存在M-x customize-option文件中)。

注意:您可以直接使用setq +变量名称

使用(setq org-agenda-skip-deadline-prewarning-if-scheduled t) lisp函数:

另一种方法是直接使用它:

.emacs
  • 在您的*scratch*文件或
  • M-x eval-buffer缓冲区中,然后是apiVersion: extensions/v1beta1 kind: Deployment metadata: name: myApp-deployment spec: replicas: 3 template: metadata: labels: app: myApp spec: containers: - name: myApp image: myAppcontainerregistry.azurecr.io/myApp-images:latest ports: - containerPort: 80 --- apiVersion: v1 kind: Service metadata: name: myAppservice spec: type: LoadBalancer ports: - port: 80 selector: app: myApp

(您的修改是即时的但未保存。)