[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Functions in SBE blocks
From: |
Viktor Rosenfeld |
Subject: |
[O] Functions in SBE blocks |
Date: |
Sat, 7 Jul 2012 20:58:31 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi,
I can't get SBE blocks called from a table to work, if they use
functions like org-parse-time-string.
Suppose I have the following table:
| Start | Ende | |
|------------------+------------------+-|
| [2011-06-29 Wed] | [2012-02-29 Wed] | |
#+TBLFM: $3='(sbe "billable-month" (start $1) (end $2))
and the following source block:
#+NAME: billable-month(start="[2011-06-29 Wed]", end="[2012-02-29 Wed]")
#+BEGIN_SRC emacs-lisp
(let* ((start-date start))
(message "%s" start-date))
#+END_SRC
If I evaluate the table, the start date is put into the last column.
However, if I change the code to the following:
#+NAME: billable-month(start="[2011-06-29 Wed]", end="[2012-02-29 Wed]")
#+BEGIN_SRC emacs-lisp
(let* ((start-date (org-parse-time-string start)))
(message "%s" (nth 4 start-date)))
#+END_SRC
then the string #ERROR is inserted into the table. Evaluating the source
block directly yields the correct result.
What's going on here?
Thanks,
Viktor
- [O] Functions in SBE blocks,
Viktor Rosenfeld <=