all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: William Denton <wtd@pobox.com>, emacs-orgmode@gnu.org
Subject: Re: Org functions in source blocks
Date: Sat, 10 Dec 2022 09:28:09 +0700	[thread overview]
Message-ID: <a3127651-02f6-2ff3-4b17-a01423ff8a31@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2212091527010.89774@shell3.miskatonic.org>

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	other threads:[~2022-12-10  2:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09 20:41 Org functions in source blocks William Denton
2022-12-10  2:28 ` Max Nikulin [this message]
2022-12-12  3:23   ` William Denton
2022-12-13 15:05     ` Max Nikulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a3127651-02f6-2ff3-4b17-a01423ff8a31@gmail.com \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=wtd@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.