Subject: Re: bug#76538: 31.0.50; 31.0.50; 31.0.50; feature/igc: using magit-section-cycle-global (S-TAB) and magit-section-toggle (TAB) in some random ways blocks GNU Emacs.

From: Ihor Radchenko <[email-masked]>
Date: Thu, 27 Feb 2025 18:19:56 +0000

Gerd Möllmann <[email-masked]> writes:

> Stefan Monnier <[email-masked]> writes:
>
>> Maybe if we change the `DO_MARKERS` iteration to scan from the end,
>> we'd recover a behavior much closer to what we see on `master`.
>> Gerd?
>
> I don't know, but it might well be that one order is as bad as the
> other, depending on the order in which markers are added to and removed
> from the marker array. And I have no intuition what a marker array ends
> up looking like in a typical use case, alas.
>
> Hm. Can we record the insertion order somehow? I guess that's what the
> heuristic is using? 

FYI, I tried various tweaks to that loop while debugging and concluded
that DO_MARKERS loop is not the main bottleneck in this particular bug
report.

I am wondering if anyone else is able to reproduce the problem locally.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>