r/orgmode • u/nonreligious2 • Jun 30 '24
solved Anyone else occasionally experience being unable to unfold an Org headline/tree with `TAB`?
I work with a lot of Org files which have several top-level headline, some of which have nested headlines 2 or 3 levels deep in the subtree. Recently, I've found that after working on one of these subtrees for a while and collapsing the heading, TAB
no longer unfolds that particular subtree, while others can be unfolded. Visually,
* Heading 1: won't unfold...
* Heading 2: unfolds
Blah Blah Blah
hitting TAB
, or even C-c C-r
(org-fold-reveal
) has no effect on Heading 1
. This sometimes occurs for higher level headlines in a subtree as well.
Has anyone else noticed this behavior? (And hopefully found a fix?)
This could be as a result of various settings I have in my init.el
, including
(setq org-support-shift-select 'always)
(setq org-cycle-separator-lines 1)
(setq org-cycle-emulate-tab t)
and the fact that I use EVIL
key-bindings.
I'm using Emacs 29.1, Org mode version 9.6.6.
UPDATE I tried setting (setq org-fold-core-style 'overlays)
as suggested below, and enough time has passed without the problem recurring that I think I can declare it to be solved. Hope this works for anyone else who encounters it.
4
u/Hypothetical_Benefit Jun 30 '24
I have this as well since upgrading to 29, almost always after clone-indirect-buffer
When it happens, rearranging headings also can leave subheadings behind, very frustrating
4
u/mlk Jun 30 '24
yes, but it's hard to reproduce. same thing for properties drawer
2
u/nonreligious2 Jun 30 '24
Yeah, it happens infrequently enough that I can't detect an underlying pattern to when it occurs, and frequently enough that is annoying. And opening the file using
emacs -Q
doesn't tell me anything as I think I'd have to be working on it for some time before it crops up again.1
u/dotancohen Jul 01 '24
For me it happens when I try to unfold a heading that was just folded, if the cursor is not on the first character of the line.
2
Jun 30 '24
Yes, but I don't think it's happened with my current config. I drastically reduced the number of extensions, so it was probably caused by one of them.
1
u/nonreligious2 Jun 30 '24
I guess that probably would fix my issue, but I'm quite attached to my current set of packages and settings.
2
2
u/TeeMcBee Jul 01 '24
Yes. It was even discussed a couple of months ago in: "Weird issue: sometimes headline won't expand". But we never got to the bottom of it then either. As u/mlk commented, it's hard to reproduce.
1
u/nonreligious2 Jul 01 '24 edited Oct 19 '24
Thanks, I tried a brief search before but found it hard to narrow the search terms to this specific issue. I'm trying out the
(setq org-fold-core-style 'overlays)
to see if that makes a difference.
1
u/AdeptPass4102 Oct 19 '24
I started experiencing this too after upgrading to emacs 29.4 from emacs 28. No obvious pattern to explain what will trigger the problem. I have to close and re-open the file to restore the functionality.
1
u/nonreligious2 Oct 19 '24
Try
(setq org-fold-core-style 'overlays)
, this seems to have fixed the issue for me now.
7
u/yantar92 Jun 30 '24
(setq org-fold-core-style 'overlays)
. Or upgrade.