Re: [Pre-PATCH v2] Add the capability to specify lexical scope in tangled files (was: Add new :lexical header argument)

2023-08-27 Thread Evgenii Klimov
Hi Ihor On August 23, 2023 12:44:32 PM GMT+01:00, Ihor Radchenko wrote: >Ihor Radchenko writes: > >> What about generalizing the idea and providing a way to set Emacs >> buffer-local variables in the tangled files? >> >> Can be something like: >> >> #+begin_src elisp :file-locals

Re: [Pre-PATCH v2] Add the capability to specify lexical scope in tangled files (was: Add new :lexical header argument)

2023-08-23 Thread Ihor Radchenko
Ihor Radchenko writes: > What about generalizing the idea and providing a way to set Emacs > buffer-local variables in the tangled files? > > Can be something like: > > #+begin_src elisp :file-locals (lexical-binding t eval (line-number-mode)) Over one month have passed since the last message

Re: [Pre-PATCH v2] Add the capability to specify lexical scope in tangled files (was: Add new :lexical header argument)

2023-07-16 Thread Ihor Radchenko
Timothy writes: >> 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 suppose part of the question is what sort of way we treat it? In my mind, > considering the current way lexical scope is seen in Emacs

Re: [Pre-PATCH v2] Add the capability to specify lexical scope in tangled files (was: Add new :lexical header argument)

2023-07-16 Thread Ihor Radchenko
"Berry, Charles" writes: >> IIRC, there wasn't much discussion. The current situation doesn't seem >> ripe for documentation in the manual. > > Agreed. Maybe it would suffice to use enhanced docstrings for the > org-babel-execute: functions and point to them in the manual. IMHO, this is

Re: [Pre-PATCH v2] Add the capability to specify lexical scope in tangled files (was: Add new :lexical header argument)

2023-07-15 Thread Berry, Charles
> On Jul 15, 2023, at 9:11 AM, Thomas S. Dye wrote: > > > Ihor Radchenko writes: > >> "Thomas S. Dye" writes: >> Am I correct that language-specific header arguments are not yet covered in the manual? I can't find any reference of "lexical" there. >>> >>> Yes, I believe so.

Re: [Pre-PATCH v2] Add the capability to specify lexical scope in tangled files (was: Add new :lexical header argument)

2023-07-15 Thread Thomas S. Dye
Ihor Radchenko writes: "Thomas S. Dye" writes: Am I correct that language-specific header arguments are not yet covered in the manual? I can't find any reference of "lexical" there. Yes, I believe so. Language-specific header arguments for many languages are documented at

Re: [Pre-PATCH v2] Add the capability to specify lexical scope in tangled files (was: Add new :lexical header argument)

2023-07-15 Thread Timothy
Hi Ihor, > 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 suppose part of the question is what sort of way we treat it? In my mind, considering the current way lexical scope is seen in Emacs (used everywhere

Re: [Pre-PATCH v2] Add the capability to specify lexical scope in tangled files (was: Add new :lexical header argument)

2023-07-15 Thread Ihor Radchenko
"Thomas S. Dye" writes: >> Am I correct that language-specific header arguments are not yet >> covered >> in the manual? I can't find any reference of "lexical" there. > > Yes, I believe so. Language-specific header arguments for many > languages are documented at >

Re: [Pre-PATCH v2] Add the capability to specify lexical scope in tangled files (was: Add new :lexical header argument)

2023-07-15 Thread Ihor Radchenko
Timothy 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

Re: [Pre-PATCH v2] Add the capability to specify lexical scope in tangled files (was: Add new :lexical header argument)

2023-07-14 Thread Thomas S. Dye
Evgenii Klimov writes: No Wayman writes: [...] I, and others, have been surprised to find that the tangled file does not have lexical binding enabled when :lexical blocks are tangled. Am I correct that language-specific header arguments are not yet covered in the manual? I can't

Re: [Pre-PATCH v2] Add the capability to specify lexical scope in tangled files (was: Add new :lexical header argument)

2023-07-14 Thread Evgenii Klimov
No Wayman writes: [...] > I, and others, have been surprised to find that the tangled file does > not have lexical binding enabled when :lexical blocks are tangled. Am I correct that language-specific header arguments are not yet covered in the manual? I can't find any reference of "lexical"

Re: [Pre-PATCH v2] Add the capability to specify lexical scope in tangled files (was: Add new :lexical header argument)

2023-07-14 Thread No Wayman
From: Ihor Radchenko I am not sure if I like this approach. I have 2 problems with the patch: 1. Previous users of :lexical header arg might be surprised. Though it is an OK breaking change since people who used :lexical argument and expected it to be ignored in the tangled file

Re: [Pre-PATCH v2] Add the capability to specify lexical scope in tangled files (was: Add new :lexical header argument)

2023-07-14 Thread Timothy
Hi Ihor, > 2. More importantly, we are adding ob-emacs-lisp-specific handling into >generic ob-tangle. > > What about generalizing the idea and providing a way to set Emacs > buffer-local variables in the tangled files? Looking at this patch earlier, I had the same concern. I think it’s

Re: [Pre-PATCH v2] Add the capability to specify lexical scope in tangled files (was: Add new :lexical header argument)

2023-07-14 Thread Ihor Radchenko
Evgenii Klimov writes: > diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS > index a4725ae8c..c632c4814 100644 > --- a/etc/ORG-NEWS > +++ b/etc/ORG-NEWS > @@ -284,6 +284,13 @@ setting the ~STYLE~ property for each sub-task. > The change is breaking when ~org-use-property-inheritance~ is set to ~t~. >

[Pre-PATCH v2] Add the capability to specify lexical scope in tangled files (was: Add new :lexical header argument)

2023-07-13 Thread General discussions about Org-mode.
Ihor Radchenko writes: > Evgenii Klimov writes: > >> * lisp/ob-core.el (org-babel-common-header-args-w-values): Add new >> :lexical header argument. > > A short note: ob-emacs-lisp already defines :lexical header arg. See > org-babel-header-args:emacs-lisp. Thanks for pointing it out. Updated