From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: using org-babel-trim in org-sbe? Date: Thu, 03 Apr 2014 13:48:44 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVg8f-0007K6-91 for emacs-orgmode@gnu.org; Thu, 03 Apr 2014 07:49:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVg8X-0005of-IN for emacs-orgmode@gnu.org; Thu, 03 Apr 2014 07:48:57 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:3005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVg8X-0005oW-BR for emacs-orgmode@gnu.org; Thu, 03 Apr 2014 07:48:49 -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 noticed a call to org-sbe failed because there were some extra spaces present in one argument. I tried to clean them up before calling the code block, but instead I'm getting literally what I'm writing. Here is an example: --8<---------------cut here---------------start------------->8--- #+name: spending #+begin_src sh :var c="bar" :results output echo "res:$c:" #+end_src | Name | Test1 | Test2 | |------+-------------+------------------------------| | Food | res: Food : | res: (org-babel-trim Food) : | #+TBLFM: $2='(org-sbe spending (c (concat "\"" $1 "\"")))::$3='(org-sbe spending (c (concat "\"" (org-babel-trim $1) "\""))) --8<---------------cut here---------------end--------------->8--- The Test1 column shows the extra space, and the Test2 column my attempt to clean things up. I suppose this behavior is due to the fact that org-sbe is a macro, but I don't know how tell it to evaluate its arguments and not pass them literally. Any suggestion on how to proceed? Thanks, Alan