reddit / emacs

Method to disable folding in Org mode?

semi_competent · 2022-09-19 15:19
I hate folding of sub-trees in org mode (really I hate folding in all circumstances). Is there a way to globally disable it for org-mode? Is there a way to disable it for all modes? I've tried googling the topic a couple times and I didn't find anything obvious.
akirakom · 2022-09-19 15:28
It's probably impossible to completely disable folding. You can set `org-startup-folded` to `nofold`, but there can be per-file `STARTUP` header that overrides the option. You can disable tab and shifttab: ``` (define-key org-mode-map [remap org-cycle] #'ignore) (define-key org-mode-map [remap org-shifttab] #'ignore) ```
akirakom · 2022-09-19 15:30
> Is there a way to disable it for all modes? If this is about `outline-minor-mode`, it doesn't fold text unless you enable it.
semi_competent · 2022-09-19 15:43
That seems to work. Thank you!
Schievel1 · 2022-09-20 04:47
Why do you want to disable it? Just dont fold. Or does it fold auto automatically?
7890yuiop · 2022-09-20 05:20
You can display *all* invisible text with `M-x visible-mode`; or by default with: (add-hook 'org-mode-hook #'visible-mode)
HM0880 · 2022-09-20 14:03
Do you mean something like this? ;; Show everything when .org file is opened (setq org-startup-folded `showeverything) `C-h v org-startup-folded RET` will show the other settings.
semi_competent · 2022-09-20 21:23
Right now if I accidentally hit TAB it's folding. I almost never want folding. I run everything at high resolution so screen real estate is almost never an issue. I also journal by day, or have a file per research project so my files aren't super huge.
Schievel1 · 2022-09-20 21:41
Then maybe bind org-toggle-fold or whatever it's called to something different Than tab?