From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Morgan Willcock Newsgroups: gmane.emacs.bugs Subject: bug#73889: 31.0.50; speedbar-expand-line-descendants produces nested "DEFUN" structures Date: Sat, 19 Oct 2024 19:55:29 +0100 Message-ID: <8734krhqhq.fsf@ice9.digital> References: <86o73gj8jh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15914"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73889@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 19 20:56:59 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t2EdG-0003tP-28 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Oct 2024 20:56:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2Ecz-00068y-Bj; Sat, 19 Oct 2024 14:56:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2Ecw-00068l-5z for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 14:56:39 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t2Ecv-0003gJ-UA for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 14:56:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=b4t95wP6YPBLpGi7wjGdKT+6QdobQxafoPgbhDvstwI=; b=Bp/GieuOrheDOoeoAVpmIh8poo5dNaXcP9J+GJKcnHTmPnzAwZ6x8sfzzglS7kUZbDO7nkgDCGTqO3jAIPmtVaTWy/DzMC8ptd8fLNg60LNBkScRz25i6TlV2OBlqDI82L7vcfTwk6E4+13dE2304CPndX2A7PSXVoCdARmZvd7qTV1BKqAGy0PdGm2N3N4azf1CokHAzkUtc2/0KNAZFjXVFR0QiglLb3JP8gys0B4jw06xC6/3PfM8XY1ZwJjhzNz3GKpgGgOf3cSSFUJ28Y8+JRKY4+CZj9Zn3KuMiGpcnedU7bOR5p/fDG0DBhXXF5imbjOrtqb5L1mc1GRQLQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2EdJ-0006nf-Ux for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 14:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Morgan Willcock Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Oct 2024 18:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73889 X-GNU-PR-Package: emacs Original-Received: via spool by 73889-submit@debbugs.gnu.org id=B73889.172936418426080 (code B ref 73889); Sat, 19 Oct 2024 18:57:01 +0000 Original-Received: (at 73889) by debbugs.gnu.org; 19 Oct 2024 18:56:24 +0000 Original-Received: from localhost ([127.0.0.1]:44795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2Eci-0006ma-8V for submit@debbugs.gnu.org; Sat, 19 Oct 2024 14:56:24 -0400 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:46817) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2Ecf-0006mJ-Ue for 73889@debbugs.gnu.org; Sat, 19 Oct 2024 14:56:23 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 2FD7EFF802; Sat, 19 Oct 2024 18:55:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ice9.digital; s=gm1; t=1729364130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b4t95wP6YPBLpGi7wjGdKT+6QdobQxafoPgbhDvstwI=; b=TRcPZknHMKcadnKKxiEAFaMhQqt7em86zONHxN2N6FFk5O/5f8uJcfqKogBMXkWjiypj13 K08fERxYIzxcXYm6wRqhx0+w5DAs3VDIF+5bHM7Yv7ga0I5eV9KtgvbyHz7sesE8swqK5U 0SvWXo3hCb6hFYUyZY4J/VwwpEnsviJf2AY5D2Mz22OHies2T/6tA+Ksht7HiKOH1Kv3jr fBZlX4lfTeycLRjEMOY42NlGa7cpEeehEzS4hRtTXZPW8Q7ADctogfiYo6rSApd3jwMXsO HYjrw7yE1/Xg0IQKf92TDOAatlkFxA46oOZKfOYuze+XShHp4C7g+4Iu9yjvtQ== In-Reply-To: <86o73gj8jh.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Oct 2024 20:40:18 +0300") X-GND-Sasl: morgan@ice9.digital X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293907 Archived-At: 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