From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Computing the value of some cells of a table using a named code block Date: Wed, 02 Apr 2014 13:58:09 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVJoF-0005gy-0G for emacs-orgmode@gnu.org; Wed, 02 Apr 2014 07:58:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVJo5-0003Zf-QW for emacs-orgmode@gnu.org; Wed, 02 Apr 2014 07:58:22 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:6265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVJo5-0003ZV-KL for emacs-orgmode@gnu.org; Wed, 02 Apr 2014 07:58:13 -0400 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Hello, I have a table that summarizes my monthly budget, and I would like to add a column where I compute my actual spending. I can get this information using a shell script, but I don't know how to integrate it in the table. Here is a contrived example: --8<---------------cut here---------------start------------->8--- #+name: spending #+begin_src sh :var category="foo" echo $category #+end_src | Category | Budget | Spending | |----------+--------+----------| | Food | 1000 | | | Rent | 1000 | | #+TBLFM: $3=call_spending("$1") --8<---------------cut here---------------end--------------->8--- My question is: how do I write the TBLFM so that every cell of column 3 is the result of call the named block with column 1 as argument? Thanks, Alan