From: Eli Zaretskii <eliz@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: 70846@debbugs.gnu.org
Subject: bug#70846: Imenu flatten
Date: Sat, 11 May 2024 13:33:03 +0300 [thread overview]
Message-ID: <8634qo3ag0.fsf@gnu.org> (raw)
In-Reply-To: <86o79dmx8u.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 10 May 2024 19:45:37 +0300)
> From: Juri Linkov <juri@linkov.net>
> Cc: 70846@debbugs.gnu.org
> Date: Fri, 10 May 2024 19:45:37 +0300
>
> >> BTW, the manual says in (info "(emacs) Imenu"):
> >>
> >> You can customize the way the menus are sorted by setting the
> >> variable ‘imenu-sort-function’. By default, names are ordered as they
> >> occur in the buffer; if you want alphabetic sorting, use the symbol
> >> ‘imenu--sort-by-name’ as the value. You can also define your own
> >> comparison function by writing Lisp code.
> >>
> >> But imenu-sort-function affects only the mouse popup menu.
> >>
> >> To be able to customize sorting of imenu completion candidates
> >> in the minibuffer, another patch is needed that sets a category
> >> for sorting customization:
> >
> > I agree that it is better to sort the same way in both cases, so
> > changes to do that are welcome.
>
> So now pushed.
>
> > But please also amend the text in the manual to say so, because
> > currently it only talks about "menus", which could arguably be
> > interpreted as pertaining only to popup menus.
>
> The "menus" above are pertaining only to popup menus,
> and the variable ‘imenu-sort-function’ can't be used
> to change the sorting order of Imenu completion candidates.
> Only the following customization changes this order:
>
> (add-to-list 'completion-category-overrides
> '(imenu (display-sort-function . identity)))
>
> Using this setting is especially essential for Imenu
> on a PDF document with doc-view.el to keep the order
> of chapters for the table of contents.
>
> But I have no idea how to document this customization.
Now I'm confused: I thought the change you installed was supposed to
make sure the completion candidates are sorted using the same sort
order as determined by imenu-sort-function. If not, then what did
your change do in this matter?
next prev parent reply other threads:[~2024-05-11 10:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-09 16:29 bug#70846: Imenu flatten Juri Linkov
2024-05-09 16:45 ` Eli Zaretskii
2024-05-10 6:52 ` Juri Linkov
2024-05-10 7:29 ` Eli Zaretskii
2024-05-10 16:45 ` Juri Linkov
2024-05-11 10:33 ` Eli Zaretskii [this message]
2024-05-12 6:55 ` Juri Linkov
2024-05-12 7:10 ` Eli Zaretskii
2024-05-12 16:37 ` Juri Linkov
2024-05-12 17:17 ` Eli Zaretskii
2024-05-13 6:57 ` Juri Linkov
2024-05-13 7:46 ` Eli Zaretskii
2024-05-14 6:05 ` Juri Linkov
2024-05-14 6:34 ` Eli Zaretskii
2024-05-10 17:06 ` Juri Linkov
2024-05-28 17:53 ` Juri Linkov
2024-05-29 18:05 ` Juri Linkov
2024-06-06 5:35 ` Yuan Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8634qo3ag0.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=70846@debbugs.gnu.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).