emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Org functions in source blocks


From: Max Nikulin
Subject: Re: Org functions in source blocks
Date: Sat, 10 Dec 2022 09:28:09 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 10/12/2022 03:41, William Denton wrote:

#+begin_src emacs-lisp :results raw
(org-lookup-all "x" '(remote(test_table, @I$A..@II$A)) nil)
#+end_src

There is nothing wrong with `org-lookup-all'. It just does not receive arguments you expect. Try

#+begin_src emacs-lisp :results raw
(list "x" '(remote(test_table, @I$A..@II$A)) nil)
#+end_src

#+RESULTS:
(x (remote (test_table (, @I$A..@II$A))) nil)

@I$A and the "remote" function are available in table formulas only. Moreover you quoted remote, so this s-expression is not evaluated. In addition, unlike in table formulas, in elisp function arguments are separated by space, not by comma.

Use :var to pass test_table to a source block

#+begin_src emacs-lisp :results raw :var data=test_table
data
#+end_src

#+RESULTS:
(( A) (! A) ( x) ( ) ( x) ( x) (# 3))

Unfortunately there are no convenient shortcuts for range selectors like "@I$A..@II$A" (at least ready to use). You should use some functions instead.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]