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

Toh*_*iko 6 emacs folding org-mode

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

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

** Task 1

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

** Task 2
Run Code Online (Sandbox Code Playgroud)

问题是,当我折叠"任务1"(通过在其行上按C-tab)时,子任务及其内容被正确折叠,但"子任务1.2"的内容也被折叠(即,其下的新行) ).

如果我按"子任务1.2"的线C-标签同时,消息"SUBTREE(没有孩子)"被印刷和"子任务1.2"被正确地折叠.

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

jue*_*jue 5

使用(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.
Run Code Online (Sandbox Code Playgroud)