emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: How do I chain babel blocks with arguments?
Date: Fri, 18 Apr 2014 08:43:39 +0200	[thread overview]
Message-ID: <m2oazz6stg.fsf@polytechnique.org> (raw)
In-Reply-To: <87d2gg0xjc.fsf@gmail.com> (Eric Schulte's message of "Thu, 17 Apr 2014 00:42:26 -0500")

Hi Eric,

On 2014-04-17 07:42, Eric Schulte <schulte.eric@gmail.com> writes:

> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>> How can I execute block `test1' from block `test2' by passing an
>> argument that is one from test2?
> #+name: z
> : bar
> #+name: test1
> #+begin_src emacs-lisp :var x="foo"
> x
> #+end_src
> #+name:test2
> #+begin_src emacs-lisp :var y=test1(x=z)
> y
> #+end_src
> #+RESULTS: test2
> : bar

Thank you for the suggestion, but I'm afraid it does not do what I want:
I cannot pass a different argument 'z' to test2 (called test4 in the
following snippet):

--8<---------------cut here---------------start------------->8---
#+name: z
: "bar"
#+name: test3
#+begin_src emacs-lisp :var x="foo"

#+begin_src emacs-lisp :var y=test1(x=z)

#+results: test4
: "bar"

#+call: test4(z="BAZ")

: "bar"
--8<---------------cut here---------------end--------------->8---

In this case, org-sbe works great, and I've been able to achieve what
I want. I still need to clean it up before describing it to the list.

Thanks again,


  reply	other threads:[~2014-04-18  7:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 17:04 How do I chain babel blocks with arguments? Alan Schmitt
2014-04-16 20:49 ` Charles Berry
2014-04-17 10:11   ` Alan Schmitt
2014-04-17 10:24     ` Thorsten Jolitz
2014-04-17 11:37       ` Alan Schmitt
2014-04-17  5:42 ` Eric Schulte
2014-04-18  6:43   ` Alan Schmitt [this message]
2014-04-20  1:41     ` Eric Schulte
2014-04-20  3:33       ` Xebar Saram
2014-04-21  1:22         ` Eric Schulte
2014-04-22  6:53       ` Alan Schmitt
2014-04-22 11:30         ` Eric Schulte
2014-04-22 12:47           ` Alan Schmitt
2014-04-24  1:16             ` Eric Schulte

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:

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=m2oazz6stg.fsf@polytechnique.org \
    --to=alan.schmitt@polytechnique.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulte.eric@gmail.com \


* 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 public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).