Status-Detective-783 · 2022-02-12 02:39
I'm a very new newbie. The pdf (https://orgmode.org/orgguide.pdf) already explained tab cycling in two sections back, "2.2 Visibility Cycling", and I understand that. But then under "2.4 Structure Editing" they indicate this key binding:
> "TAB in new empty entry: In a new entry with no text yet, TAB cycles through reasonable levels."
Is that different than the normal tab cycling? I can't find that TAB does anything different anywhere, other than normal cycling to me, but maybe I don't understand the context ("in a new entry with no text") or my org file is still too simple to demonstrate this function?
nv-elisp · 2022-02-12 06:38
If you have an empty entry like so (with `|` denoting the point):
* |
And you hit `TAB`, it will cycle through various levels of the hierarchy.
This allows you to quickly choose the level you want the heading to be at before you start typing the rest of it.
[deleted] · 2022-02-12 09:21
[deleted]
ian_mtl · 2022-02-12 15:36
Been using org for several years and never noticed this feature before. Useful.
oantolin · 2022-02-12 16:58
It seems this behavior was removed at some point, at least by default. I tried it with Org 9.4.4 and it behaves exactly as you described, but then I tried again with Org 9.5.2 and TAB doesn't do that anymore!
Those two org versions also differ in what they bind TAB to: in Og 9.4.4 it's bound to `org-cycle` but in Org 9.5.2 it's bound to `outline-cycle`. I don't know why: Org 9.5.2 still has the `org-cycle` function (and it still behaves as you describe), and it has no deprecation warnings, but it seems to not be the default binding for TAB anymore. Weird.
yantar92 · 2022-02-13 05:24
> in Org 9.5.2 it's bound to outline-cycle
It is not true. Org 9.5.2 still binds TAB to `org-cycle`. If it is not the case for you, you should be loading Org in some strange way. If you think that you did not do anything wrong, feel free to send a bug report to Org mode ML. See https://orgmode.org/manual/Feedback.html#Feedback
oantolin · 2022-02-13 12:16
I didn't load it in a strange way. From `emacs - q` I ran `M-x package-initialize` and then created a new buffer and ran `M-x org-mode`.
Maybe it has to do with the Emacs version? I think outline-cycle is pretty new, maybe Org mode detected whether you have it or not. I'll look into it.
yantar92 · 2022-02-13 12:40
I am unable to reproduce using latest stable Org, using Emacs bult-in Org, and using Org from main branch on Emacs 27, Emacs 28, and latest Emacs master. Maybe you can try to reinstall Org?