How can I enable lexical binding in an init.el file that is tangled from an org mode file? I have an org mode file called Emacs.org
which is used to tangle the init.el
file using the command M-x org-babel-tangle
, but I'm not able to enable lexical bindings in this tangled file.
Note that - I have the property header like so: #+PROPERTY: header-args:elisp :lexical t :tangle /file/path
I found this answer in a related question which says that
- adding
#+begin_src elisp :lexical t
as the header of the source code block - OR
- using
#+PROPERTY: header-args:elisp :lexical t
as property header arguments should work.
But I tried this out and it don't seem to work for me (which is also mentioned in a comment in that post by someone else)