* Using code block function as formula in tables
@ 2017-01-11 13:13 Roland Everaert
2017-01-11 14:51 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Roland Everaert @ 2017-01-11 13:13 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 341 bytes --]
Hi,
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.
Regards,
Roland.
[-- Attachment #2: Type: text/html, Size: 500 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Using code block function as formula in tables
2017-01-11 13:13 Using code block function as formula in tables Roland Everaert
@ 2017-01-11 14:51 ` Nicolas Goaziou
2017-01-12 12:37 ` Roland Everaert
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2017-01-11 14:51 UTC (permalink / raw)
To: Roland Everaert; +Cc: emacs-orgmode
Hello,
Roland Everaert <reveatwork@gmail.com> 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 <http://orgmode.org/worg/org-contrib/babel/intro.html>
however. Search for "org-sbe" there.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Using code block function as formula in tables
2017-01-11 14:51 ` Nicolas Goaziou
@ 2017-01-12 12:37 ` Roland Everaert
2017-01-12 12:55 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Roland Everaert @ 2017-01-12 12:37 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]
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 <mail@nicolasgoaziou.fr>
wrote:
> Hello,
>
> Roland Everaert <reveatwork@gmail.com> 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 <http://orgmode.org/worg/org-contrib/babel/intro.html>
> however. Search for "org-sbe" there.
>
> Regards,
>
> --
> Nicolas Goaziou
>
[-- Attachment #2: Type: text/html, Size: 1759 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Using code block function as formula in tables
2017-01-12 12:37 ` Roland Everaert
@ 2017-01-12 12:55 ` Nicolas Goaziou
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2017-01-12 12:55 UTC (permalink / raw)
To: Roland Everaert; +Cc: emacs-orgmode
Hello,
Roland Everaert <reveatwork@gmail.com> writes:
> 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?
See `org-sbe' docstring.
> This feature really needs to be documented and extensively.
I agree. Patches welcome.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-12 12:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-11 13:13 Using code block function as formula in tables Roland Everaert
2017-01-11 14:51 ` Nicolas Goaziou
2017-01-12 12:37 ` Roland Everaert
2017-01-12 12:55 ` Nicolas Goaziou
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.