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#73533: [PATCH] Rewrite speedbar expansion for all descendants Date: Sat, 19 Oct 2024 18:30:13 +0100 Message-ID: <87a5f0c862.fsf@ice9.digital> References: <87y13blhu1.fsf@ice9.digital> <86a5fr5apb.fsf@gnu.org> <87v7yeeqig.fsf@ice9.digital> <87wmitfr8p.fsf@ice9.digital> <8734lhgfnn.fsf@ice9.digital> <87ttdm4f3d.fsf@ice9.digital> <86y12klery.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="16552"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73533@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 19:31:20 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 1t2DIN-00047w-Tz for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Oct 2024 19:31:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2DHy-0003Yc-9M; Sat, 19 Oct 2024 13:30:54 -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 1t2DHj-0003UG-4d for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 13:30:40 -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 1t2DHi-0001wm-Rw for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 13:30:38 -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=SUtVZJ7RKjTOd15eC+tXNL16DP8+489+apXcisdrcFk=; b=NdbHzy3n2LvrRFRluw1dfIqT8CBf8Z0dXfO75uxuePW/aC7Y7RmLQGUPKrWT27I4IaNSKTWE0v3aTifNC23j6xLe2GigUAXIFFFYmd4Bw2SPYJ/rfku3aGJK9Yzu3EEBDvOr6ATL1tGjVPu4W5krsqhCWD3Ao1TPwQoC0ZTAGKm96JURElziaK7BtL3jQ7/99KijVe0lXD3bXz2XiuN0i8DEAGC9JN76w4sKZw9CswjW/6aJkiSrUDKclfEhXMm/8DK+BztDcqyIOdNLo4PPwGyYqR+rwM8olc+xS4fT+3MQFp2Ec0+ZIY0fdRtJVofHNatLNplleKKKpIRTaZ5dAg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2DI6-0002vf-DX for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 13:31:02 -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 17:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73533 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 73533-submit@debbugs.gnu.org id=B73533.172935904811235 (code B ref 73533); Sat, 19 Oct 2024 17:31:02 +0000 Original-Received: (at 73533) by debbugs.gnu.org; 19 Oct 2024 17:30:48 +0000 Original-Received: from localhost ([127.0.0.1]:44662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2DHr-0002v9-Nz for submit@debbugs.gnu.org; Sat, 19 Oct 2024 13:30:48 -0400 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:59389) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2DHp-0002uq-1H for 73533@debbugs.gnu.org; Sat, 19 Oct 2024 13:30:46 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id A9AB4FF804; Sat, 19 Oct 2024 17:30:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ice9.digital; s=gm1; t=1729359014; 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=SUtVZJ7RKjTOd15eC+tXNL16DP8+489+apXcisdrcFk=; b=k0d6QDiL70odTi2oUiQXSFIzY4Px8QRN0DBS2qFngz8OgzCjYV0jSMFEwxjAv7Dpl6AlpH RDZR/y9n+GmX65cB0vnmi3gySl6whU0iFrnzl27bwqoZTSK4sYTgM53B+lwR2uhM0TRP9c K1418fyUR1MEZQfAplBID/z/V5iWUrauT0JUBWMKWwlw/NMT4pCzlI6vmlZpFme0dWqmDM je6jeuElwoJeXQJJ02DDlZft/2DS3a6vccT9n+0o5G7pJOH6UWsQVXZO7PKaDGpObs3Z44 aSZ8Nps6Jy9igwMK2/5yp/2tLCdsLExJZr1EvXDD/4mDYnc8wTr1qnzChBnPmg== In-Reply-To: <86y12klery.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Oct 2024 10:42:41 +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:293898 Archived-At: Eli Zaretskii writes: > There seems to be still a problem with some files, in that > speedbar-expand-line-descendants takes a very long time, and if I > interrupt it with C-g, I see nested DEFUNs, something that shouldn't > happen, because DEFUNs are never nested. E.g., try this: > > $ cd /path/to/emacs/src > $ ./emacs -Q > M-x speedbar RET > > At this point you should see all the files in the Emacs src directory. > Go to androidfns.c and type '['. After about 10 sec type C-g. You > should see nested DEFUns in the Speedbar frame. > > Could you please look into this? This looks like an unrelated issue where the logic to modify the item hierarchy does not make sense under certain conditions. It only seems to trigger when particular limits are met, but the limits can be lowered for an easier demonstration: (require 'speedbar) (setq speedbar-tag-regroup-maximum-length 2) (setq speedbar-tag-split-minimum-length 2) (speedbar-prefix-group-tag-hierarchy '(("DEFUN" . 1) ("DEFUN" . 5) ("DEFUN" . 10))) => (("DEFUN" ("DEFUN" . 1) ("DEFUN" . 5) ("DEFUN" . 10))) i.e. speedbar-prefix-group-tag-hierarchy (which is meant to restructure the Imenu data to make better use of the available space in the Speedbar) is generating a new parent item which contains the items that were meant to be inserted. It is probably best to open a separate bug report for this because working out exactly how and why speedbar-prefix-group-tag-hierarchy applies particular sorting actions will probably take someone a while. -- Morgan Willcock