From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: what's wrong with this sbe? Date: Mon, 05 Mar 2012 15:09:49 +0100 Message-ID: <80linfnnpu.fsf@somewhere.org> References: <8762ejdxe3.fsf@ed.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Myles, Myles English wrote: > Please could tell me where I am going wrong with this? I just can't get > the source block to put a result in the table. > > #+name: workingDays > #+BEGIN_SRC emacs-lisp :var hms="0" > (require 'org-timer) > (/ (org-timer-hms-to-secs hms) (* 60 60 8)) > #+END_SRC > > #+call: workingDays(hms="236:30:00") > > #+RESULTS: workingDays(hms="236:30:00") > : 29 > > | Days | H:M:S | > |--------+-----------| > | #ERROR | 236:30:00 | > #+TBLFM: @2$1='(sbe "workingDays" (hms @2$2)) This is because the string you send in the `sbe' call should be (double-)quoted, as in: | Days | H:M:S | |------+-------------| | 29 | "236:30:00" | #+TBLFM: @2$1='(sbe workingDays (hms @2$2)) This is really annoying for most cases, and dates back from a problem to distinguish between references and strings, at some point. I wonder whether this heavy constraint (strings must be enclosed) still applies or not. Best regards, Seb PS- No need to quote the function name... -- Sebastien Vauban