Timothy <orgm...@tec.tecosaur.net> writes: > It occurs to me that this use case could also perhaps be satisfied by > file-local > variables? If we presume that mixing tangling to lexically-bound and > non-lexically bound elisp files is a corner case we don’t care that much > about, > a `org-babel-elisp-lexical' variable could be used to set the behaviour, and > modified using file-local variable forms as usual.
I do not think that setting `lexical-binding' file-local variable in an Org file makes much sense. I am sure that we can do better. I can see that there are people in favour of :lexical feature. So, we can probably add it, but it should not be in ob-core. Instead, we should provide an infrastructure allowing ob-* backends to modify tangling. Maybe some kind of special function that will override default `org-babel-spec-to-string' per backend? -- 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>