emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Heading won't unfold on TAB if last line has just spaces, with empty line preceding.
@ 2020-10-14  3:33 Giovanni Moretti
  2020-10-14  4:29 ` Kyle Meyer
  0 siblings, 1 reply; 2+ messages in thread
From: Giovanni Moretti @ 2020-10-14  3:33 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]

There's something weird with headings that can cause unfolding to fail. Headings can 
be folded with TAB refuse to unfold - they need Shift-TAB to see the contents. This 
is scary as it looks like content has been accidentally deleted whereas it's really 
just hidden.

The TAB-cycling worked as expected in Org 9.1.9 for the following example but fails 
in 9.4.

The example below illustrates the difficulties:

  * Block 1 - you can delete X to leave two empty lines and TAB on "Block 1" (or 1a)
    cycles as expected - GOOD!

But if the last line isn't empty but has spaces:

  * Block 2 - deleting X (leaving empty line) and then Z to leave the last line with
    just a space (one or more) and heading will fold on TAB /but won't unfold/.
    Shift-Tab is needed.
  * Block 3 - the same symptoms as Block 2 but has a subtree to show
    "Folded/Children/Subtree" when Tab-cycling on level one heading.

Cheers
Giovanni

===================

* Block 1 - OK
Block 1 text

** Block 1a heading
Block 1a content
X
X
* BAD BLOCK 2 - Delete X & Z, then TAB WON'T UNFOLD
Block 2 content
X
  Z
* BAD BLOCK 3 - TAB WON'T UNFOLD
   Block 2 content

** BAD BLOCK 3a
    Block 3a content
X
  Z
* Block 4 - OK
The end




[-- Attachment #2: Type: text/html, Size: 1839 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-14  4:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-14  3:33 Heading won't unfold on TAB if last line has just spaces, with empty line preceding Giovanni Moretti
2020-10-14  4:29 ` Kyle Meyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).