组织模式折叠将空格视为内容

时间:2016-10-30 18:56:39

标签: emacs org-mode folding

免责声明:我是org-mode的新手。

在组织模式中,我有时会添加额外的空行,以便在扩展时使不同任务之间的分离更加清晰。像这样:

** Task 1

*** Subtask 1.1
    text text
*** Subtask 1.2

** Task 2

问题在于,当我折叠“任务1”(通过在其行上按C-tab)时,子任务及其内容被正确折叠,但“子任务1.2”的内容也被折叠(即,新的它下面的一行)。

如果我在“子任务1.2”行上按下C-tab,则会打印消息“SUBTREE(NO CHILDREN)”并且“子任务1.2”正确折叠。

这是正常的吗?我可以以某种方式纠正这种行为,以便不折叠空内容吗?

1 个答案:

答案 0 :(得分:4)

在配置文件中使用(setq org-cycle-separator-lines -1)。 这将解决它。

Documentation:
Number of empty lines needed to keep an empty line between collapsed trees.
If you leave an empty line between the end of a subtree and the following
headline, this empty line is hidden when the subtree is folded.
Org mode will leave (exactly) one empty line visible if the number of
empty lines is equal or larger to the number given in this variable.
So the default 2 means at least 2 empty lines after the end of a subtree
are needed to produce free space between a collapsed subtree and the
following headline.

If the number is negative, and the number of empty lines is at least -N,
all empty lines are shown.
相关问题