diff options
author | Bastien <bzg@gnu.org> | 2020-09-05 08:01:58 +0200 |
---|---|---|
committer | Bastien <bzg@gnu.org> | 2020-09-05 08:01:58 +0200 |
commit | ee3c3b554799c9f0fbe387848cd9eec7e9ab9d95 (patch) | |
tree | 37148dbf60590e751a1e1dceefbf6192cffabcb6 | |
parent | 8a3777e35b3ccebb1d24d75f386f25f974c7c347 (diff) | |
download | org-mode-ee3c3b554799c9f0fbe387848cd9eec7e9ab9d95.tar.gz |
org.el: Allow empty subtrees to be folded back
* lisp/org.el (org-cycle-internal-local): Allow empty subtrees to
fold back.
See <https://orgmode.org/list/CA+Yh0SRPgeMUYAD0ds3TZnwpPKq8_mpact-OeKK-rXoQNb-eEg@mail.gmail.com>
Reported-by: Dmitrii Korobeinikov <dim1212k@gmail.com>
-rw-r--r-- | lisp/org.el | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el index 5f41418..4068a41 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6433,8 +6433,7 @@ Use `\\[org-edit-special]' to edit table.el tables")) (goto-char eos) (outline-next-heading) (when (org-invisible-p) (org-flag-heading nil)))) - ((and (or (>= eol eos) - (not (string-match "\\S-" (buffer-substring eol eos)))) + ((and (>= eol eos) (or has-children (not (setq children-skipped org-cycle-skip-children-state-if-no-children)))) |