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

Support for lexical binding #31

Open
jaor opened this issue May 24, 2021 · 6 comments
Open

Support for lexical binding #31

jaor opened this issue May 24, 2021 · 6 comments

Comments

@jaor
Copy link

jaor commented May 24, 2021

Hi. As you know, in elisp blocks one can specify that their evaluation be performed with lexical-binding set to t. But, as far as i can tell, poly-org is oblivious of that setting: when i enter an elisp block, it always shows as set in dynamical binding, and evaluations inside with, say, C-x C-e, are performed with lexical-binding set to nil. Would it be possible to inherit the org block header setting?

Thanks!

@vspinu
Copy link
Contributor

vspinu commented May 26, 2021

This is a bit of an issue I am afraid. All elisp blocks share same indirect buffer for efficiency. So it would be ok if all org blocks use lexical bindings. Is there a way to specify lexical bindings setting for all code blocks? If so then we should inherit that setting. If you could figure out how to retrieve the setting from the org buffer then I will do the rest.

@jaor
Copy link
Author

jaor commented May 26, 2021 via email

@jaor
Copy link
Author

jaor commented May 26, 2021 via email

@jaor
Copy link
Author

jaor commented May 27, 2021 via email

@vspinu
Copy link
Contributor

vspinu commented May 27, 2021

I think we can also honor local block binding. Basically when a user enters into a code block the value of that block is installed, when the user exits the block the global value is restored. I don't imediately see any issues with this, do you?

Would it be difficult for you to figure out how to retrieve the biding value, both local and global? I am not an org user so for me it's a bit of a cost to dig ATM.

@jaor
Copy link
Author

jaor commented May 27, 2021 via email

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