From e8070d71ab7d3403272636282b0eafadc5836425 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Mon, 26 Oct 2020 23:51:27 -0400 Subject: [PATCH] Revert "org.el: Allow empty subtrees to be folded back" * lisp/org.el (org-cycle-internal-local): Revert ee3c3b554799c9f0fbe387848cd9eec7e9ab9d95, which does not appear to have addressed the original issue and breaks cycling with empty lines. Reported-by: B Goodr Ref: https://orgmode.org/list/CAJj=8EFJXFu9ZQ11cO24AAu=1jykW2Zr+=R4FLuKG=bLjfUe+g@mail.gmail.com Reported-by: Mikhail Skorzhisnkii Ref: https://orgmode.org/list/87h7qu10ht.fsf@eml.cc --- lisp/org.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 73b1f9458..70ab8d37a 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6464,7 +6464,8 @@ Use `\\[org-edit-special]' to edit table.el tables")) (goto-char eos) (outline-next-heading) (when (org-invisible-p) (org-flag-heading nil)))) - ((and (>= eol eos) + ((and (or (>= eol eos) + (not (string-match "\\S-" (buffer-substring eol eos)))) (or has-children (not (setq children-skipped org-cycle-skip-children-state-if-no-children))))