3

Turn on the header :lexical, e.g., #+begin_src elisp :lexical t :results pp (lambda ()) #+end_src #+RESULTS: : (closure : (t) : nil) You can also use #+PROPERTY: header-args:elisp :lexical t to turn it on for the whole org file. Or change org-babel-default-header-args:emacs-lisp to turn it on globally. (setq lexical-binding t) in the code does not work ...


1

There is nothing like that: Org babel evaluates the source block by storing all the commands in a temp file, runs the file using the appropriate language interpreter, collects the output, does minor munging to it and writes it out as the results block. What you are asking for (a header argument that modifies this work flow) is fundamentally incompatible with ...


1

Would changing the input to a table work? Something like this: #+name: foo | 3492-134.2 | | 3492-134.2+1428 | #+begin_src python :var tbl=foo :results output for row in tbl: print(eval(row[0])) #+end_src #+RESULTS: : 3357.8 : 4785.8 I think that's about the simplest you can do. You can add entries to the table, but the source block does not ...


Only top voted, non community-wiki answers of a minimum length are eligible