From: Tassilo Horn <tsdh@gnu.org>
To: "João Távora" <joaotavora@gmail.com>
Cc: 71367@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>,
acorallo@gnu.org, theo@thornhill.no
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 [thread overview]
Message-ID: <871q5akuua.fsf@gnu.org> (raw)
In-Reply-To: <CALDnm53_jfWAZ11jgOcNNwT_vua0qauJHv5wAqwaMCfBr9UXkA@mail.gmail.com> ("João Távora"'s message of "Thu, 6 Jun 2024 15:01:53 +0100")
João Távora <joaotavora@gmail.com> 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 ‘imenu.el’.
...
Value:
(("root"
(#(" " 0 1
(breadcrumb-siblings #1=
((#("active" 0 1 (breadcrumb-siblings #1#))
. #<marker at 137 in mirrorstatus.json>)
(#("completion_pct" 0 1 (breadcrumb-siblings #1#))
. #<marker at 159 in mirrorstatus.json>)
(#("country" 0 1 (breadcrumb-siblings #1#))
. #<marker at 188 in mirrorstatus.json>)
(#("country_code" 0 1 (breadcrumb-siblings #1#))
. #<marker at 218 in mirrorstatus.json>)
(#("delay" 0 1 (breadcrumb-siblings #1#)) . #<marker
at 246 in mirrorstatus.json>)
...
. #<marker at 5 in test.json>)
("foo" . #<marker at 27 in test.json>) ("bar" . #<marker at 43 in test.json>)
("foo" . #<marker at 77 in test.json>) ("bar" . #<marker at 93 in test.json>)))
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
next prev parent reply other threads:[~2024-06-06 14:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-04 19:40 bug#71367: 30.0.50; ELPA package breadcrumb causes Emacs freeze when editing json file Tassilo Horn
2024-06-04 20:49 ` Andrea Corallo
2024-06-05 7:24 ` Tassilo Horn
2024-06-05 9:36 ` Andrea Corallo
2024-06-06 9:35 ` Eli Zaretskii
2024-06-06 10:07 ` João Távora
2024-06-06 11:33 ` Eli Zaretskii
2024-06-06 11:47 ` João Távora
2024-06-06 12:08 ` Eli Zaretskii
2024-06-06 13:00 ` João Távora
2024-06-06 13:37 ` Eli Zaretskii
2024-06-06 14:01 ` João Távora
2024-06-06 14:29 ` Tassilo Horn [this message]
2024-06-07 21:23 ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=871q5akuua.fsf@gnu.org \
--to=tsdh@gnu.org \
--cc=71367@debbugs.gnu.org \
--cc=acorallo@gnu.org \
--cc=eliz@gnu.org \
--cc=joaotavora@gmail.com \
--cc=theo@thornhill.no \
/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).