unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 47073@debbugs.gnu.org, haj@posteo.de
Subject: bug#47073: 28.0.50; speedbar: sorting in sublists is in reverse
Date: Fri, 12 Mar 2021 09:53:20 +0200	[thread overview]
Message-ID: <83pn04lsen.fsf@gnu.org> (raw)
In-Reply-To: <87wnudxknp.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri,  12 Mar 2021 01:47:38 +0100)

> 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.





  reply	other threads:[~2021-03-12  7:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 16:26 bug#47073: 28.0.50; speedbar: sorting in sublists is in reverse Harald Jörg
2021-03-12  0:47 ` Lars Ingebrigtsen
2021-03-12  7:53   ` Eli Zaretskii [this message]
2021-03-18  7:24     ` Lars Ingebrigtsen

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=83pn04lsen.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=47073@debbugs.gnu.org \
    --cc=haj@posteo.de \
    --cc=larsi@gnus.org \
    /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).