Ihor Radchenko <yanta...@posteo.net> writes: > Morgan Smith <morgan.j.sm...@outlook.com> writes: > >> * lisp/org/org-compat.el: Add definition of 'org-imenu-flatten'. >> (org-imenu-get-tree): Use 'org-imenu-flatten'. >> --- >> >> Hello! >> >> I've been using this patch for a bit and I quite like it. One would think >> there would be an option in imenu itself to flatten trees but that does not >> seem to be the case. I copied the defcustom from 'doc-view-imenu-flatten'. > > Have you considered adding a "flatten" option to imenu itself? > That way, you could automatically get the functionality for free > everywhere, not just in Org mode.
Built-in imenu in Emacs 30 will have a new `imenu-flatten' option. https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=4306aba2d0447fd79c0b749a984ccd7bdbc92361 So, we do not need a dedicated toggle on Org mode side. Canceled. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>