I'm running the latest Emacs from the master branch which has some
more regex optimizations and I was still able to trigger your
stack overflow!
Thank you so much for this lovely optimization! I've taken the
liberty of doing a search and replace on the entire repository so
we can speed up like 12 regexs!
Additionally, you might have solved these two open issues on our
bug tracker which have to do with regex stack overflows:
related-to: https://list.orgmode.org/87bjabvk51.fsf@localhost
related-to:
https://list.orgmode.org/du2p193mb2422253b9729a928d0f569f088...@du2p193mb2422.eurp193.prod.outlook.com
Tests pass emacs 28, 29, 30, 31, and 32.
I'm a little disappointed on the readability of this regex
construct but the manual does say this is the correct way to do
this.
Applied, as commit aa63a7bd9
https://cgit.git.savannah.nongnu.org/cgit/org-mode.git/commit/?id=aa63a7bd945c8af88c931ebb7f61630eddefc588
I really appreciate you finding this! Thank you!