smartparens icon indicating copy to clipboard operation
smartparens copied to clipboard

Speed up org mode string pair parsing by ilmiting the parser's context to node / block

Open Fuco1 opened this issue 11 months ago • 2 comments

See #1031 comment from @jaccarmac

Fuco1 avatar Mar 20 '24 07:03 Fuco1

Thanks much; Willing and able to try out the fix(es) when they're available. I probably don't have the codebase knowledge to attempt anything myself, but might end up hacking at it. In that case, any pointers are welcome.

jaccarmac avatar Mar 20 '24 18:03 jaccarmac

I implemented some code that basically computes bounds of the search which are reasonable for the given buffer. In case of org mode, it makes no sense to compute anything related to pairs outside of the current headline (because that is not even syntactically valid org mode), but smartparens doesn't really know about headline / block boundaries.

During implementing this I found a couple really weird issues and went down the rabbit hole of fixing those and broke the new feature in the process :D I'll continue tomorrow.

Fuco1 avatar Mar 20 '24 19:03 Fuco1