3

After quite a bit of fighting trying to create a wrapper emacs-lisp function I found the org-sbe macro that solves this exact problem. To make it work, I've changed TBLFM definition to the following: #+TBLFM: $3='(org-sbe "currencyRateOnDate" (date $2))' org-sbe macro docs: org-sbe org-sbe is a Lisp macro in `ob-table.el'. (org-sbe SOURCE-BLOCK &...


2

I think what you are looking for is related to the library of babel. In this example, I construct something similar to the babel-call org element and use it to get the info needed for org-babel-execute-src-block to execute it with the argument. #+name: main | x | 1 | a | | value | 2 | b | #+NAME: ref #+BEGIN_SRC emacs-lisp :var name="" table=...


1

Don't do it with babel: do it in lisp - define a function to do what you want and bind it to a key. You can then execute the function from anywhere using that key. Something like this: #+begin_src elisp (defun ndk/org-babel-evaluate-test-block-from-code-block () (interactive) (save-excursion (org-babel-goto-named-src-block "code") (org-...


1

I think the given (Ruby) solution is fine: I don't consider it a dirty hack. The same thing can be done in just about any language of course. Particularly, as in my case, if one does not speak Ruby. Here's a code block in emacs lisp (using the string library s.el, also available from MELPA): #+name: desc-lisp #+begin_src elisp :results drawer (setq x "...


1

I am not sure if it still helps and if it is exactly what you need... I am using something like within spacemacs: ;;----------------------------------------------------------------------- (message "--- START : filemanage ----") (let ((srcuf (concat dotspacemacs-directory "user_filemanage.org")) (uf (concat dotspacemacs-...


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