From: Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: babel, header arguments.
Date: Thu, 20 Nov 2014 10:36:17 +0100 [thread overview]
Message-ID: <86389emcxa.fsf@example.com> (raw)
In-Reply-To: 8761ec2vsp.fsf@gmail.com
jenia.ivlev wrote:
> So lets say there's this function:
>
> #+name: my-plus
> #+begin_src scheme
> (define my-plus
> (lambda (x y) (+ x y)))
> #+end_src
>
> And i want to call it from another source block, like so:
>
> #+tblname: addition
> | sum |
> |--------|
> | #ERROR |
> #+TBLFM: @2$1='(org-sbe "my-plus" (33 22))
>
> As you can see, I get an error. How do I write these "header-arguments"
> (i think they are called) to achieve calling one src-block from another.
This should do it (untested):
(org-sbe "my-plus" (x 33) (y 22))
> Also, second scenario, can I somehow call my-plus from a source-block as
> so:
>
> #+begin_src scheme
> (my-plus 3 4)
> #+end_src
I think you must also call `org-sbe'.
Best regards,
Seb
--
Sebastien Vauban
next prev parent reply other threads:[~2014-11-20 9:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 18:44 babel, header arguments jenia.ivlev
2014-11-20 9:36 ` Sebastien Vauban [this message]
2014-11-21 19:35 ` jenia.ivlev
2014-11-21 19:49 ` Thomas S. Dye
2014-11-21 20:09 ` jenia.ivlev
2014-11-21 20:32 ` jenia.ivlev
2014-11-21 20:36 ` Thomas S. Dye
2014-11-21 20:55 ` jenia.ivlev
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=86389emcxa.fsf@example.com \
--to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
/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.