[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47073: 28.0.50; speedbar: sorting in sublists is in reverse
From: |
Eli Zaretskii |
Subject: |
bug#47073: 28.0.50; speedbar: sorting in sublists is in reverse |
Date: |
Fri, 12 Mar 2021 09:53:20 +0200 |
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Fri, 12 Mar 2021 01:47:38 +0100
> Cc: 47073@debbugs.gnu.org
>
> haj@posteo.de (Harald Jörg) writes:
>
> > This isn't specific for "current" Emacs, it happens in Emacs 26.1, too.
> >
> > How to reproduce:
> >
> > - emacs -Q
> > - open a Perl file with lots of subroutines
> > (e.g. https://github.com/foswiki/distro/blob/master/core/lib/Foswiki.pm)
> > or a Elisp file with lots of defuns
> > (e.g. lisp/progmodes/cperl-mode.el)
> > - M-x speedbar
> >
> > Following the default configuration, speedbar clusters the display of
> > subroutines into alphabetically sorted batches of 20 entries each.
>
> I've barely used speedbar before, but where does speedbar display these
> clusters? The window that pops up with "emacs -Q" and `M-x speedbar' in
> cperl-mode.el is unclustered, as far as I can tell.
The recipe is incomplete. Try this:
. emacs -Q
. C-x C-f Foswiki.pm
. M-x speedbar
. in the speedbar frame go to Foswiki.pm, and click the "+" icon.
. you should now see the content of cperl.el in batches, sorted
alphabetically, with each batch having its own "+" icon
. click on some of the "+" icons of some of the batches and look at
the order of the entries within
After doing this, I think this observation of the OP:
> While the batches are sorted alphabetically (e.g. "ge to i" comes before
> "l to re" in Foswiki.pm), the entries in each of the batches are sorted
> in reverse: The batch "ge to i" has a first entry of "isValidWikiWord"
> and a last entry of "getApproxRevTime".
is incorrect: the entries are simply unsorted, I guess they appear in
the order they are found in the file or something. For example, the
entries below "ge to i" in Foswiki.pm are displayed thusly here:
> isValidWikiWord
> isValidTopicName
> isValidWebName
> isValidEmailAddress
> i18n
> inlineAlert
> isTrue
> innerExpandMacros
> inContext
> generateHTTPHeaders
> getCGISession
> getLoginManager
> getSkin
> getScriptUrl
> getPubURL
> generateRandomChars
> getWorkArea
> getApproxRevTime
And you can see that the first 4 are not in any alphabetically-sorted
order. Likewise, these entries near the end:
> getCGISession
> getLoginManager
> getSkin
> getScriptUrl
> getPubURL
aren't sorted, neither in ascending nor in descending order.