自定义组织模式变量——文档在哪里?

Customizing Org Mode variables--where is the documentation?

我已经使用 Org-mode 几个月了,在自定义 Emacs 时,我很难找到有关如何专门自定义各种变量的文档。

示例:我已成功设置存档,但想要自定义 org-archive-save-context-info 变量以减少与任务一起存档的信息。 我不想对每个文件执行此操作,而是在我的配置文件中执行此操作。尽管我尽了最大努力,但我没有看到有关自定义此功能的语法和参数的文档。

当我在 Emacs 中自定义变量时,我 确实 看到了一些文档 UI-- 但我正在寻找文档,以便我可以看到语法和参数通过配置文件自己自定义。我可以通过这种方式向后学习(通过 'easy customization'):自定义一个变量,查看 Emacs 写入配置的内容,尝试调整它,等等

[编辑] 我说的是存档后出现的任务下方的信息,如下所示:

  :PROPERTIES:
  :ARCHIVE_TIME: 2018-09-10 Mon 11:24
  :ARCHIVE_FILE: ~/Dropbox/logs/capture.org
  :ARCHIVE_OLPATH: Tasks
  :ARCHIVE_CATEGORY: capture
  :ARCHIVE_TODO: DONE
  :END:

这是故意的吗?我只需要先 'know ELisp' 吗?您是打算使用 Emacs 点击 UI 来自定义这样的东西吗?如果我能找到 FM,我很高兴 RTFM。

Is the intention that you use the Emacs point-and-click UI to customize things like this?

如果您不了解 elisp,您肯定会使用自定义界面(即使您知道,您也可能会选择使用它)。

Do I just need to 'know ELisp' first?

是的,您至少需要对 elisp 有一定的了解才能理解文档并能够编写自己的配置更改。这是因为 elisp Emacs 的配置语言,因此文档是在该上下文中编写的。 (在每篇使用它们的文档中解释和重复基本的 lisp 概念是没有意义的。)

就是说,许多人只是从配置示例中复制和粘贴 - 即使您不完全理解它们,您也可能通过这种方式掌握基础知识。不过,如果您对 Emacs 很认真,那么花一些时间学习 elisp 将对您将来大有裨益。

I can learn it backwards this way (via 'easy customization'): customize a variable, see what Emacs wrote to the config, try tweaking that, etc.

这是一件完全合理的事情。

FWIW C-hv org-archive-save-context-info其实有背景了解就很清楚了

This variable can be a list of any of the following symbols:

time       The time of archiving.
file       The file where the entry originates.
ltags      The local tags, in the headline of the subtree.
itags      The tags the subtree inherits from further up the hierarchy.
todo       The pre-archive TODO state.
category   The category, taken from file name or #+CATEGORY lines.
olpath     The outline path to the item.  These are all headlines above
           the current item, separated by /, like a file path.

这告诉您可以在配置文件中使用以下内容:

(setq org-archive-save-context-info '(time file todo))

Happy to RTFM if I could find the FM.

您可以在 "Emacs Lisp Intro" 手册中开始学习 elisp,您应该可以在 Info 目录的顶部找到该手册,或者直接使用 C-hig (eintr) RET。如果您需要学习如何使用信息 reader.

,请从那里输入 h