Subject: bug#70696: [PATCH] Autoload `re-disassemble'

From: Ihor Radchenko <[email-masked]>
Date: Thu, 02 May 2024 14:26:47 +0000

Stefan Monnier <[email-masked]> writes:

> The functionality was designed under the assumption that it's used for
> the benefit of those working on the regexp engine.
>
> AFAIK you're not working on the regexp engine (are you?), so I'm curious
> what you're using this function for: maybe it is more generally useful
> than we thought and it deserves to be less hidden.

I saw the NEWS entry:

    ** New function 're-disassemble' to see the innards of a regexp.
    If you compiled with '--enable-checking', you can use this to help debug
    either your regexp performance problems or the regexp engine.

and I noticed the "regexp performance" part, which Org mode sometimes
struggles with (we just had a bug report recently where the problem lies
with way too complex regexp that makes things slow)

So, I tried to play around with this new function, attempting to see if
it can be of any use to simplify regular expressions. (Spoiler: alas, it
is not by itself useful, without knowing the internals of Emacs regexp
engine.)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
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>