From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cecil Westerhof Subject: Re: Making a list to string Date: Thu, 12 Jul 2007 07:23:37 +0200 Message-ID: <1184217817.6283.165.camel@Barebusta.DecebalComp> References: <1184186606.6253.154.camel@Barebusta.DecebalComp> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I8r9R-0006WT-34 for emacs-orgmode@gnu.org; Thu, 12 Jul 2007 01:23:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I8r9P-0006W5-7M for emacs-orgmode@gnu.org; Thu, 12 Jul 2007 01:23:40 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I8r9P-0006W2-15 for emacs-orgmode@gnu.org; Thu, 12 Jul 2007 01:23:39 -0400 Received: from smtp-vbr9.xs4all.nl ([194.109.24.29]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I8r9O-00082v-Ft for emacs-orgmode@gnu.org; Thu, 12 Jul 2007 01:23:38 -0400 Received: from Barebusta.DecebalComp (DecebalComputing.xs4all.nl [213.84.157.201]) by smtp-vbr9.xs4all.nl (8.13.8/8.13.8) with ESMTP id l6C5NbcB081482 for ; Thu, 12 Jul 2007 07:23:37 +0200 (CEST) (envelope-from CecilWesterhof@xs4all.nl) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: org-mode 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 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