Daniel Bausch <[email protected]> writes: > Org-Babel lets you name a source block and call it like a function, and it > serializes values across languages. What it does not offer is a convenient, > documented way to do that *from Lisp*: to call a named block, pass it live > values, and get a typed result back. > ... > The attached patch adds a small, documented entry point, org-babel-call: > > (org-babel-call "summary" :run 1 :rows table)
In general, the idea makes sense. > Open questions for the list: > > - Name and home: org-babel-call in ob-core.el -- acceptable? Sounds ok. > - Should it accept extra header-argument overrides (e.g. a :results value), > or is the fixed ":results silent" (return the value, no buffer insertion) > right for a first version? Probably, it should. Consider a block with :eval no. If you want to run it, there should be a way to override :eval. > - Keyword keys (:run) versus plain symbols -- any preference? :run reads like a header argument, which might be confusing. Something closer to let-binding syntax could be more natural. Like :var ((var val) ...) -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
