[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [FR] Allow flattened imenu index

From: João Távora
Subject: Re: [FR] Allow flattened imenu index
Date: Mon, 11 Dec 2023 11:51:03 +0000

On Sat, Dec 9, 2023 at 5:39 PM Juri Linkov <juri@linkov.net> wrote:

>   menu1
>     sub-item1
>     sub-item2
> could be flattened to
>   menu1 -> sub-item1
>   menu1 -> sub-item2

By the way, this seems to be exactly what the breadcrumb-jump command
in my breadcrumb.el package does.  Goes reasonably well with a flex/fuzzy
completion style.

You can look at it for an implementation idea.  Just be sure to do this
flattening at the presentation level (i.e. M-x imenu), not at the
internal representation level.

It shouldn't be needed here at all, but in case anyone's thinking
about it, please avoid messing with imenu's internal representation of
hierarchies as that structure is relied upon by many extensions (not just
mine, but several others).  Even certain things supported by certain
imenu-presenting frontends (like "special elements") are not supported by
other frontends.  It's a bit of a mess.  The symbols holding/describing
this representation (imenu--index-alist, maybe others) are incorrectly
named '--' but they are most definitely externally visible and used
customization points.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]