From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roland Everaert Subject: Re: Using code block function as formula in tables Date: Thu, 12 Jan 2017 13:37:19 +0100 Message-ID: References: <87a8axtzsj.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c1cd7087410de0545e4fa79 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRedD-0006Np-7k for emacs-orgmode@gnu.org; Thu, 12 Jan 2017 07:37:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRed8-00025T-2e for emacs-orgmode@gnu.org; Thu, 12 Jan 2017 07:37:27 -0500 Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]:33971) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cRed7-00024Q-Qi for emacs-orgmode@gnu.org; Thu, 12 Jan 2017 07:37:21 -0500 Received: by mail-lf0-x233.google.com with SMTP id v186so12049826lfa.1 for ; Thu, 12 Jan 2017 04:37:21 -0800 (PST) In-Reply-To: <87a8axtzsj.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: emacs-orgmode --94eb2c1cd7087410de0545e4fa79 Content-Type: text/plain; charset=UTF-8 It works. But I had to set some headers in the code block itself as following: :exports results :results value I suppose, I can specify them directly in the org-sbe call, like with inline calls or call through #+CALL? This feature really needs to be documented and extensively. Thanks, On Wed, Jan 11, 2017 at 3:51 PM, Nicolas Goaziou wrote: > Hello, > > Roland Everaert writes: > > > Is it possible to call a code block from a table field as it is a > formula? > > > > I have tried the following syntax from a field in a table, but none of > them > > is interpreted as expected: > > > > - #+CALL: function(parameters) > > - call_function(parameters) > > > > The goal is to use the result of the call in other formulas of the > > table. > > It is called org-sbe(parameters). Unfortunately, it is not documented in > the > manual. There is > however. Search for "org-sbe" there. > > Regards, > > -- > Nicolas Goaziou > --94eb2c1cd7087410de0545e4fa79 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
It works. But I had to set some headers=C2= =A0 in the code block itself as following:

=C2=A0:exports results :r= esults value

I suppose, I can specify them directly in the org= -sbe call, like with inline calls or call through #+CALL?

This feature really needs to be documented and extensively.
=

Thanks,

On Wed, Jan 11, 2017 at 3:51 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
Hello,

Roland Everaert <reveatwork@gmai= l.com> writes:

> Is it possible to call a code block from a table field as it is a form= ula?
>
> I have tried the following syntax from a field in a table, but none of= them
> is interpreted as expected:
>
> - #+CALL: function(parameters)
> - call_function(parameters)
>
> The goal is to use the result of the call in other formulas of the
> table.

It is called org-sbe(parameters). Unfortunately, it is not documente= d in the
manual. There is <http://orgmode.org/worg/org= -contrib/babel/intro.html>
however. Search for "org-sbe" there.

Regards,

--
Nicolas Goaziou

--94eb2c1cd7087410de0545e4fa79--