emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pre-PATCH] Add new :lexical header argument


From: Evgenii Klimov
Subject: [Pre-PATCH] Add new :lexical header argument
Date: Thu, 13 Jul 2023 19:30:00 +0100

Hi, here I propose new header argument to enable scope change
(lexical/dynamic binding) of the tangled file.  We have :shebang header
argument and the new one behaves similarly.

If you like the idea I think we should discuss the following:
- should we allow to set it for non-elisp blocks?  e.g. :shebang is not
  restricted and `elisp-enable-lexical-binding' is smart enough to use
  the comment symbol appropriate to the context. 
- should it be :lexical or :scope.  :lexical is long to type, but boolean
  and clear; scope is shorter, but the user will have to type
  "dynamic/lexical" or "dyn/lex".
- should we add the third option of the argument to explicitly forbid
  lexical binding?  E.g. if we a have source block that rely on the
  dynamic binding but it could be used in another block with lexical
  binding via noweb. I'm not sure that it's worth the effort.
- which default value to choose?  Currently if you tangle it would be
  dynamic, but lexical binding is the future.

After all I'll add tests and update Changelog/Docs if needed.

Attachment: 0001-ob-tangle.el-Add-new-lexical-header-argument.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]