I have a src block to get a value from some table:
#+NAME: ref #+BEGIN_SRC emacs-lisp :var name="" table=main (let ((key (if (symbolp name) (symbol-name name) name))) (nth 2 (assoc key table))) #+END_SRC
In Org I can execute this by:
How can I do the same only in Lisp?
I tried this:
(defun a/ref (params) (save-excursion (goto-char (point-min)) (org-babel-goto-named-src-block "ref") (org-babel-execute-src-block nil nil params) (org-babel-read-result))) (a/ref '(("value")))
But it didn't work