[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Making a list to string
From: |
Cecil Westerhof |
Subject: |
Re: [Orgmode] Making a list to string |
Date: |
Thu, 12 Jul 2007 07:23:37 +0200 |
Op wo, 11-07-2007 te 16:59 -0500, schreef Eddward DeVilla:
> I take that back. I think it is right. I thought hard coded and
> frodatum were supposed to match. Unfortunately, it looks like the
> mailed mangles the formula line.
>
> On 7/11/07, Eddward DeVilla <address@hidden> wrote:
> > Is this any better. I don't think it's entirely right yet.
> >
> > |---+------------+------------+------------+------------|
> > | | datum | from datum | hard coded | |
> > |---+------------+------------+------------+------------|
> > | # | 2007-01-01 | 1 | 1 | 2007-01-01 |
> > | # | 2007-07-09 | 190 | 190 | 2007-07-09 |
> > | # | 2007-07-11 | 192 | 192 | 2007-07-11 |
> > | # | 2007-09-11 | 254 | 1 | 2007-09-11 |
> > | # | 20071012 | 192 | 1 | 20071012 |
> > |---+------------+------------+------------+------------|
> > #+TBLFM: $3='(time-to-day-in-year (org-read-date t t (concat
> > $2)))::$5='(concat $2)::@2$4='(time-to-day-in-year (org-read-date t t
> > "2007-01-01"));N::@3$4='(time-to-day-in-year (org-read-date t t
> > "2007-07-09"));N::@4$4='(time-to-day-in-year (org-read-date t t
> > "2007-07-11"));N::@5$4='(time-to-day-in-year (org-read-date t t
> > "2007-01-01"));N
Yes, it looks like it works completly. (What I am missing is a knowledge
of Lisp. Thus that will come.)
One thing bugs me. I am used to end a formula ending with ';N'.
Sometimes if you do not do this, this geves an error. But in this case
this gives an error:
Substitution history of formula
Orig: '(time-to-day-in-year (org-read-date t t (concat $2)))
$xyz-> '(time-to-day-in-year (org-read-date t t (concat $2)))
@r$c-> '(time-to-day-in-year (org-read-date t t (concat $2)))
$1-> '(time-to-day-in-year (org-read-date t t (concat 2007)))
Result: #ERROR
Format: NONE
Final: #ERROR
When using nothing after the formula, I get:
Substitution history of formula
Orig: '(time-to-day-in-year (org-read-date t t (concat $2)))
$xyz-> '(time-to-day-in-year (org-read-date t t (concat $2)))
@r$c-> '(time-to-day-in-year (org-read-date t t (concat $2)))
$1-> '(time-to-day-in-year (org-read-date t t (concat #("2007-01-01"
0 1 (hilit-chg hilit-chg lazy-lock t) 1 2 (hilit-chg hilit-chg lazy-lock t) 2 3
(hilit-chg hilit-chg lazy-lock t) 3 4 (hilit-chg hilit-chg lazy-lock t) 4 5
(hilit-chg hilit-chg lazy-lock t) 5 6 (hilit-chg hilit-chg lazy-lock t) 6 8
(hilit-chg hilit-chg lazy-lock t) 8 9 (hilit-chg hilit-chg lazy-lock t) 9 10
(hilit-chg hilit-chg lazy-lock t)))))
Result: 1
Format: NONE
Final: 1
And when I put ';S' after the formula, I get the same as with nothing
after the formula.
Why this error by ';N'?
Also what is the meaning of the strange expansion by concat? Maybe not
neccesary, but I like to understand what is happening.
--
Cecil Westerhof <address@hidden>