From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: Computing the value of some cells of a table using a named code block Date: Wed, 02 Apr 2014 15:04:06 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVKq1-0003en-3k for emacs-orgmode@gnu.org; Wed, 02 Apr 2014 09:04:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVKpt-0002Df-K6 for emacs-orgmode@gnu.org; Wed, 02 Apr 2014 09:04:17 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:54600) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVKpt-0002DL-DA for emacs-orgmode@gnu.org; Wed, 02 Apr 2014 09:04:09 -0400 In-Reply-To: (Michael Brand's message of "Wed, 2 Apr 2014 14:33:54 +0200") 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: Michael Brand Cc: emacs-orgmode Hi Michael, Michael Brand writes: > When there is no named source block involved I use just > > | Category | Budget | Spending | > |----------+--------+----------| > | Food | 1000 | Food | > | Rent | 1000 | Rent | > #+TBLFM: $3 = '(org-trim (shell-command-to-string (concat "echo " $1))) > > For named source blocks there is sbe, see Worg. This is most useful, thanks a lot! For the record, here is the solution using org-sbe: --8<---------------cut here---------------start------------->8--- #+name: spending #+begin_src sh :var c="bar" :results silent expr $c #+end_src | Category | Budget | Spending | |----------+--------+----------| | Food | 1000 | Food | | Rent | 1000 | Rent | #+TBLFM: $3='(org-sbe "spending" (c (concat "\"" $1 "\""))) --8<---------------cut here---------------end--------------->8--- Thanks again, Alan