Hi,

org-babel-emacs-lisp-lexical is interpreting arguments incorrectly.

Steps to reproduce:
--------------------
#+begin_src emacs-lisp
  (setq org-babel-default-header-args:elisp '((:lexical . t)))
#+end_src

#+begin_src emacs-lisp
  (funcall (let ((x 1)) (lambda () x)))
#+end_src

Expected behavior:
#+RESULTS:
: 1

Actual behavior:
Symbol’s value as variable is void: x
-----
The reason is that the implementation of org-babel-emacs-lisp-lexical
only
checks for "yes" and "t". The doc of `org-babel-default-header-
args:emacs-lisp`
says:

  A value of "yes" or t causes source blocks to be eval'd using lexical
scoping.

This seems to be an implementation or documentation bug.

Thanks,

Yuta

-----------------------------------------------------------------------


Emacs  : GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.49, cairo version 1.18.4)
 of 2025-07-18, modified by Debian
Package: Org mode version 9.7.11 (release_9.7.11 @
/usr/share/emacs/30.1/lisp/org/)

Reply via email to