From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wNQ6NQnvk2PMgQEAbAwnHQ (envelope-from ) for ; Sat, 10 Dec 2022 03:29:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id W8A6NQnvk2PxcQEAauVa8A (envelope-from ) for ; Sat, 10 Dec 2022 03:29:29 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7AB883D42F for ; Sat, 10 Dec 2022 03:29:29 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3pb9-0006zE-1z; Fri, 09 Dec 2022 21:28:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p3pb7-0006z4-7E for emacs-orgmode@gnu.org; Fri, 09 Dec 2022 21:28:17 -0500 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p3pb5-00045d-7F for emacs-orgmode@gnu.org; Fri, 09 Dec 2022 21:28:16 -0500 Received: by mail-lj1-x234.google.com with SMTP id z4so6760000ljq.6 for ; Fri, 09 Dec 2022 18:28:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=dvQHlAzRKg6H/6uZLHWdLDebgkkLG5Nyv2edvvdeZIs=; b=Uu6Evxdf7U1R24Miak6O/MgVUM9Y8pR7We2wMvJ4+WezJwi+4nXX/iYgmU2OLXLu8R 8qiLqKEqdXQsTv5gys4Ex43GEhPUiV+bRRZcXmM2Pwe8e9805KQaoQ6YDBfxh2dtzksL /Ij1UcRZk/JTo6xOajGO3CCsHtJXckBH1+ioRhFo10ZnsgVzD/+d38O8N1E7m6fBMf+8 XbclkKvsXOlzexYaAo/9SCZkNBv5KPCNxqt6d81hg1gQo8CsJFLDeqGSILtOuLbZTNey K6IiYTj1cSiIgeZbjcMoNRua8IZTJuIcqRG1dJaYiQnVlE7Paek53lHunwMpZjjj3ik4 njCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dvQHlAzRKg6H/6uZLHWdLDebgkkLG5Nyv2edvvdeZIs=; b=K16SR+RMHHp0Nr8sLjYJiERQhOufQS7l9L37JZAqPb9Knk+pwsvQjo1uQ3u1X7EGEa Vh1p7UvRvVmboj0yJO6iue50P5A19kgoJMsFg3NxhOdUfrD/H95pJbKIo3GEAAsa7Wu0 pUMtFr6lsYp+BuMKj0977LOO3SEVultvQDhI+eW03jIBN73FPvjIBqiilPwEc+Lf3GdI hk9m89GG3ugnVBky2M8lmnAEu/pzK+46fJokG3DiZcTPWg2m0Q/xxMOIYdCejgVq/NbM lDfM9EE2VSdXNhcQe9nJnZLMFSuN4QmjTDS/3fIUapShQfB50tDWGsWIE7vfJJGtAEww neTQ== X-Gm-Message-State: ANoB5plF2mM6q7a7Fz6sk2NsXIzsn595Octrh6+TEL2KS0mnSol7SDlu 3TeKgh/qdaGWRrbVh8B0IO0= X-Google-Smtp-Source: AA0mqf5GCYrTLKVsAQ1SP4ancuLlIxyB7z0pqYMaGFX8b9cFLpOHRZ4ayhe8NAlde4Pr8lkUrV+zqA== X-Received: by 2002:a05:651c:88f:b0:278:e731:9fe5 with SMTP id d15-20020a05651c088f00b00278e7319fe5mr1950571ljq.37.1670639292667; Fri, 09 Dec 2022 18:28:12 -0800 (PST) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id by12-20020a05651c1a0c00b002770eafaafbsm440418ljb.99.2022.12.09.18.28.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Dec 2022 18:28:12 -0800 (PST) Message-ID: Date: Sat, 10 Dec 2022 09:28:09 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Org functions in source blocks Content-Language: en-US To: William Denton , emacs-orgmode@gnu.org References: From: Max Nikulin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::234; envelope-from=manikulin@gmail.com; helo=mail-lj1-x234.google.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.288, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670639369; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=dvQHlAzRKg6H/6uZLHWdLDebgkkLG5Nyv2edvvdeZIs=; b=NGccMOTyJS0Dpg28WoEicRKtqhcueLdbJsCMhcvhFR5GvYzDw5bELyyITKSDmvJVj/+Eeq 16WXIZ+BHV2HyXElKQANZgER6aZVhswBRnbqMf6hPcQqvzT2IXks9/vJGPbNYs4dkYB/q/ ZFquPKFpt+oy68hQJMMgf6thylQCQJ1D3UM/Q5Muj7PJsfQ5htGMnaQDZg9a1uTL5aEY/s WGgKKqV7h3D96fjyqH+RTcOrORDKgQbMYU7rbWSQ9sWB0B1okOWd643BHPdq2sKZvHyEqI JP8XkERp//UsYxB4J6UKHE96R9IyIg+d0Q6WyNb20YvPX/TWw/cONMh1FY+Smw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670639369; a=rsa-sha256; cv=none; b=BB3T0VOIh4Q67J8khHB8UN16nlnhqHfAW9917R9yWuIGEE+ktInl3W9OoWEFWTM1t3k8kH opGUmLzcXfjHTUXaY0g6Z9Pq3OMlw39qifuYqasJ27AMdKdE4/diY4IfdnkKkv2w64c1H9 yZx3xZ+NINT1Y+LxMsPqsNAj0yHgpKA0u0+KXOr3Vq9CDwX2r+RU7qKgRalB9jqxjy80hS /YzPCm84QhU5Bl5/Tg2wbtQ/veByayYDSVc8bLZVBvcp3HPeSA4+5CmrnYEr+slMUmjoxf Z+NbPBCj8f8wHDa+HaJe/hnBIiixWpvFknAcv+f/ty+ts3WX2UQlEdCYsNUc8A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Uu6Evxdf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.26 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Uu6Evxdf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7AB883D42F X-Spam-Score: 6.26 X-Migadu-Scanner: scn1.migadu.com X-TUID: Uyz5WAB3FXS5 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.