From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eddward DeVilla" Subject: Re: Making a list to string Date: Wed, 11 Jul 2007 16:59:07 -0500 Message-ID: References: <1184186606.6253.154.camel@Barebusta.DecebalComp> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I8kDG-0002xq-HU for emacs-orgmode@gnu.org; Wed, 11 Jul 2007 17:59:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I8kDF-0002xe-J4 for emacs-orgmode@gnu.org; Wed, 11 Jul 2007 17:59:09 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I8kDF-0002xb-DU for emacs-orgmode@gnu.org; Wed, 11 Jul 2007 17:59:09 -0400 Received: from nz-out-0506.google.com ([64.233.162.234]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I8kDE-00015n-V4 for emacs-orgmode@gnu.org; Wed, 11 Jul 2007 17:59:09 -0400 Received: by nz-out-0506.google.com with SMTP id f1so1366903nzc for ; Wed, 11 Jul 2007 14:59:08 -0700 (PDT) In-Reply-To: Content-Disposition: inline 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: Cecil Westerhof Cc: org-mode 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 > > > On 7/11/07, Cecil Westerhof wrote: > > I have the following table: > > |---+------------+---------------------------+------------+------------------------------------------| > > | | datum | from datum | hard coded | | > > |---+------------+---------------------------+------------+------------------------------------------| > > | # | 2007-01-01 | 192 | 1 | [50, 48, 48, 55, 45, 48, 49, 45, 48, 49] | > > | # | 2007-07-09 | 192 | 190 | [50, 48, 48, 55, 45, 48, 55, 45, 48, 57] | > > | # | 2007-07-11 | 192 | 192 | [50, 48, 48, 55, 45, 48, 55, 45, 49, 49] | > > | # | 2007-09-11 | 192 | 1 | [50, 48, 48, 55, 45, 48, 57, 45, 49, 49] | > > | # | 20071012 | 192 | 1 | [50, 48, 48, 55, 49, 48, 49, 50] | > > |---+------------+---------------------------+------------+------------------------------------------| > > #+TBLFM: $3='(time-to-day-in-year (org-read-date t t "$2"));N::$5="$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:: > > > > The column 'from datum' does not get the right values. The last column > > shows why. "$2" gives a list of ASCII values of the string instead of > > the string. This makes that org-read-data gets 50 as a parameter instead > > of the string representing a date. How do I convert this list back to > > the string it is representing? > > > > -- > > Cecil Westerhof > > > > > > > > _______________________________________________ > > Emacs-orgmode mailing list > > Emacs-orgmode@gnu.org > > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > >