emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] what's wrong with this sbe?


From: Sebastien Vauban
Subject: Re: [O] what's wrong with this sbe?
Date: Mon, 05 Mar 2012 15:09:49 +0100
User-agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.0.93 (windows-nt)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]