Ihor Radchenko <yanta...@posteo.net> writes: > Morgan Smith <morgan.j.sm...@outlook.com> writes: > >> Quirks: >> >> With the default `imenu-flatten' value of nil, it is still impossible >> to visit non-leaf headlines and no change is perceived. > > But no regressions, right? Especially in older Emacs versions with > `imenu-flatten' not yet available. >
No regressions that I can tell from my testing. Both emacs 29.3 (before imenu-flatten) and emacs-master show no change whatsoever (from what I can tell) when imenu-flatten is nil. >> Setting `imenu-flatten' to 'group works as expected with the quirk >> that top level headlines don't end up in the group. > > We may add a top-level group, can't we? > This does not seem to be a feature. You can confirm this yourself by reading the comment in `imenu--flatten-index-alist' that says "PREFIX is for internal use only". > We may also consider changing the default value of `imenu-flatten' in > Org buffers to non-nil. In my opinion this is not a good idea. While the UI of imenu is better when `imenu-flatten' is set, that's not a decision we should make for users. The inability for imenu to visit non-leaf nodes with the default UI is probably something that should be fixed in emacs core. > But what would be the best default? IMO that would be 'prefix. Which is equivalent to setting it to `t'.