From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: [Babel] pass through header arguments on #+call: lines Date: Mon, 08 Nov 2010 14:33:22 -0700 Message-ID: <87fwvbo5zx.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=47701 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFZUg-0005Bm-Fi for emacs-orgmode@gnu.org; Mon, 08 Nov 2010 16:43:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PFZUe-0003nr-K1 for emacs-orgmode@gnu.org; Mon, 08 Nov 2010 16:43:13 -0500 Received: from mail-gy0-f169.google.com ([209.85.160.169]:58274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PFZUe-0003nk-HJ for emacs-orgmode@gnu.org; Mon, 08 Nov 2010 16:43:12 -0500 Received: by gyd8 with SMTP id 8so4157920gyd.0 for ; Mon, 08 Nov 2010 13:43:11 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode There has been some recent discussion/questions regarding how to pass header arguments through to a code block being called using a #+call line. I've just pushed up a change which makes this possible. Call lines now have the following syntax, where each header argument portion is optional. #+call: block-name[:header args for block](arguments) :header args for call line here's a (possibly) illuminating example #+source: echo #+begin_src emacs-lisp :var n="me" (message "hi %s" n) #+end_src #+call: echo() #+results: echo() : hi me #+call: echo(n="you") #+results: echo(n="you") : hi you #+call: echo[:var n="you"]() #+results: echo[:var n="you"]() : hi you #+call: echo() :results vector | hi me | #+call: echo() :var n="you" : hi me Best -- Eric