Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polymode for literate-calc #30

Open
indigoviolet opened this issue Mar 29, 2022 · 3 comments
Open

Polymode for literate-calc #30

indigoviolet opened this issue Mar 29, 2022 · 3 comments

Comments

@indigoviolet
Copy link

I was attempting to create a polymode for literate-calc so I can embed it into any mode without having to use the minor mode and without the "session" leaking across.

I ran into some issues and posted in the Polymode github: polymode/polymode#313, in case you have any insight into how I can do this.

@sulami
Copy link
Owner

sulami commented Apr 2, 2022

Interesting, I hadn’t heard of Polymode.

I’ll have a closer look when I get a chance, but it looks like buffer-locality isn’t preserved properly.

@indigoviolet
Copy link
Author

@sulami wonder if you had any further insight into this?

@sulami
Copy link
Owner

sulami commented May 4, 2022

I've been playing a bit with polymode, but it's not really clear to me how it intends to avoid leakage at this point. LCM maintains calculation results in a simple local defvar, but walks the entire (current-buffer) from (point-min) to (point-max), neither of which are affected by isolation.

Wrapping literate-calc-eval-buffer in polymode-inhibit-in-indirect-buffer means it won't run anymore if the cursor is inside an embedded block, but if it runs in the parent buffer it still runs over the contents of all blocks, as they're considered part of the buffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants