all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Morgan Willcock <morgan@ice9.digital>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 73889@debbugs.gnu.org
Subject: bug#73889: 31.0.50; speedbar-expand-line-descendants produces nested "DEFUN" structures
Date: Sat, 19 Oct 2024 19:55:29 +0100	[thread overview]
Message-ID: <8734krhqhq.fsf@ice9.digital> (raw)
In-Reply-To: <86o73gj8jh.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Oct 2024 20:40:18 +0300")

Here is an example to demonstrate the specifics of the problem:

  printf "DEFUN () {};\nDEFUN () {};\nDEFUN () {};\n" >/tmp/test.c

  emacs -Q \
        --eval "(require 'speedbar)" \
        --eval "(setq speedbar-tag-regroup-maximum-length 2)" \
        --eval "(setq speedbar-tag-split-minimum-length 2)" \
        --eval "(find-file \"/tmp/test.c\")" \
        --eval "(speedbar)"

Expanding the "test.c" item in the Speedbar will now show a single
"DEFUN" item, but expanding that "DEFUN" item will just insert an
additional "DEFUN" item that also needs to be expanded.  This behaviour
will repeat infinitely.

The problem appears to originate from when the item hierarchy is
modified by speedbar-prefix-group-tag-hierarchy, where exceeding the
limits for both speedbar-tag-regroup-maximum-length and
speedbar-tag-split-minimum-length will return all items with an
additional parent item:

  (speedbar-prefix-group-tag-hierarchy
   '(("DEFUN" . 1)
     ("DEFUN" . 5)
     ("DEFUN" . 10)))

  => (("DEFUN" ("DEFUN" . 1) ("DEFUN" . 5) ("DEFUN" . 10)))

-- 
Morgan Willcock





      reply	other threads:[~2024-10-19 18:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-19 17:40 bug#73889: 31.0.50; speedbar-expand-line-descendants produces nested "DEFUN" structures Eli Zaretskii
2024-10-19 18:55 ` Morgan Willcock [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8734krhqhq.fsf@ice9.digital \
    --to=morgan@ice9.digital \
    --cc=73889@debbugs.gnu.org \
    --cc=eliz@gnu.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.