Fuco1 / smartparens

Minor mode for Emacs that deals with parens pairs and tries to be smart about it.
GNU General Public License v3.0
1.8k stars 193 forks source link

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

Open Fuco1 opened 3 months ago

Fuco1 commented 3 months ago

See #1031 comment from @jaccarmac

jaccarmac commented 3 months ago

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.

Fuco1 commented 3 months ago

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.