From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.bugs Subject: bug#71367: 30.0.50; ELPA package breadcrumb causes Emacs freeze when editing json file Date: Thu, 06 Jun 2024 16:29:49 +0200 Message-ID: <871q5akuua.fsf@gnu.org> References: <87tti8binx.fsf@fastmail.fm> <874ja7ua1m.fsf@gnu.org> <867cf2ifbp.fsf@gnu.org> <86sexqgvax.fsf@gnu.org> <86jzj2gtow.fsf@gnu.org> <86frtqgpk9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20674"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71367@debbugs.gnu.org, Eli Zaretskii , acorallo@gnu.org, theo@thornhill.no To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 06 16:31:25 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 1sFE9C-00056e-IR for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Jun 2024 16:31:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFE8f-0001Pp-Oj; Thu, 06 Jun 2024 10:30:49 -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 1sFE8d-0001H9-LQ for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 10:30:47 -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 1sFE8d-0000kZ-Be for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 10:30:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sFE8r-0000IS-KI for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 10:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Jun 2024 14:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71367 X-GNU-PR-Package: emacs Original-Received: via spool by 71367-submit@debbugs.gnu.org id=B71367.17176842191093 (code B ref 71367); Thu, 06 Jun 2024 14:31:01 +0000 Original-Received: (at 71367) by debbugs.gnu.org; 6 Jun 2024 14:30:19 +0000 Original-Received: from localhost ([127.0.0.1]:54185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFE8A-0000HY-It for submit@debbugs.gnu.org; Thu, 06 Jun 2024 10:30:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFE87-0000HI-AY for 71367@debbugs.gnu.org; Thu, 06 Jun 2024 10:30:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFE7m-0000Nk-OL; Thu, 06 Jun 2024 10:29:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=6iyn38TG6LOUCqkfjr5o8aaL1HiEv1FbFoIPtZ7yDqs=; b=pEPQ7FhM0VHl0qgWTYBH DEOXmhhjbXkFQXZossrBnE8BiFjI3U5WdkZARAsT/jbdNintsNvoCa8pTlO3iUfE0se6qE3hiV4NV gbb23exMWY4f8ux0Kzb9dFSdV+LzdyBJnueu9369aTy3XUEP0EMpU+P6l5oE2DdoVIdrrJ7p0S15D Bo4gUeSDThBEVJKtqzwn+2RJdPJMBz2yMFSRUvQAmDDudFV0J6S8qNotNv/YexMcOZbAITk8XBPIW 0lsBpOW8U3lCW5lt4kY7CV2Vg9/SfB3ZcYgYiLa1HJifFS7j6RWxQOkpZYthhmPsI2rJBfuifQi2u CaBaKCEcs2nxPw==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdelkedgjeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujghffffkgggtgfesthhqredttddtjeenucfhrhhomhepvfgrshhs ihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpe dukeevteeuvdetteejveetieejhedtteefffdvkeeikeevffdttefgveeilefhhfenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnod hmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedv leekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Thu, 6 Jun 2024 15:01:53 +0100") 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:286703 Archived-At: Jo=C3=A3o T=C3=A1vora writes: >> I understand all that. My point is that, given how little we use >> vectors in our Lisp code, having to implement that in one or two >> places is not a big deal, and doesn't necessarily mean we need a >> general-purpose primitive. > > I just said if someone comes with a breadcrumb.el solution, I'd like > to see it well encapsulated as an ADT, not mixed with the graph > algorithm. I don't care if Emacs keeps skipping this basic util for > whatever reason. Before turning to algorithm optimizations, I think there is some simpler bug somewhere. I wanted to understand how the graph imenu--in-alist (or what (breadcrumb--ipath-alist) returns) looks like, so I've created a simple test.json file: --8<---------------cut here---------------start------------->8--- { "root": [ { "foo": 1, "bar": "test1" }, { "foo": 2, "bar": "test2" } ] } --8<---------------cut here---------------end--------------->8--- At the same time, I've had my sample mirrorstatus.json open and did M-: stuff like M-: (pp (breadcrumb--ipath-alist)) here and there to get some printed representations. And somehow now my imenu--in-alist and breadcrumb--ipath-plain-cache values in the test.json buffer contains markers in both test.json AND mirrorstatus.json! --8<---------------cut here---------------start------------->8--- imenu--index-alist is a variable defined in =E2=80=98imenu.el=E2=80=99. ... Value: (("root" (#(" " 0 1 (breadcrumb-siblings #1=3D ((#("active" 0 1 (breadcrumb-siblings #1#)) . #) (#("completion_pct" 0 1 (breadcrumb-siblings #1#= )) . #) (#("country" 0 1 (breadcrumb-siblings #1#)) . #) (#("country_code" 0 1 (breadcrumb-siblings #1#)) . #) (#("delay" 0 1 (breadcrumb-siblings #1#)) . #) ... . #) ("foo" . #) ("bar" . #) ("foo" . #) ("bar" . #))) Local in buffer test.json; global value is nil --8<---------------cut here---------------end--------------->8--- That's surely now how its supposed to be. But I don't see how one can get there. I can only imagine a timer acting on the wrong buffer but the breadcrumb--idle-timer is buffer-local and the timer function ensures it runs on the buffer the timer was activated for... Bye, Tassilo