From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: thoughts: "formulas for timestamps" feature Date: Wed, 6 Jun 2007 10:10:56 +0200 Message-ID: <188ff72ee29e802d5cd813f4abd7d3d9@science.uva.nl> References: <87vee7zrgd.fsf@kosolapov-nb.plesk.ru> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hvqbh-0003EO-Fq for emacs-orgmode@gnu.org; Wed, 06 Jun 2007 04:11:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hvqbe-0003Dk-FF for emacs-orgmode@gnu.org; Wed, 06 Jun 2007 04:11:05 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hvqbe-0003Dh-Bo for emacs-orgmode@gnu.org; Wed, 06 Jun 2007 04:11:02 -0400 Received: from korteweg.uva.nl ([146.50.98.70]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hvqbd-0007Vj-1W for emacs-orgmode@gnu.org; Wed, 06 Jun 2007 04:11:01 -0400 In-Reply-To: <87vee7zrgd.fsf@kosolapov-nb.plesk.ru> 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: Ruslan Kosolapov Cc: org-mode On Jun 1, 2007, at 16:20, Ruslan Kosolapov wrote: > > Hi all, it's me again :) > > My previous message > (http://www.mail-archive.com/emacs-orgmode@gnu.org/msg01685.html) > contains complains about ability to use formulas for timestamp (third > problem). > > Yesterday I found http://www.cs.brown.edu/~gmarceau/spread.el > > I think it is what I need. But one small problem blocks me. > > In org-file I wrote: > ** NEW Task1 > DEADLINE: qwe <=3D (concat "<2007-05-15 =D0=92=D1=82=D1=80>") =3D> = task1 > > After M-x spread-recalc org file goes to: > ** NEW Task1 > DEADLINE: "<2007-05-15 =D0=92=D1=82=D1=80>" <=3D (concat = "<2007-05-15 =D0=92=D1=82=D1=80>") =3D> task1 > > But agenda do not determine dates in quotes (btw, shift-up works > well). > > I see two solutions: > - fix regexp of dates determination for quotes support (in org-mode) I would recommend against this. I am not sure what this would break, but it may very well break something. > - fix spread-mode - remove quotes printing > > I tried to fix spread-mode, and fail (there are many reasons of it). > > 1. Does org-mode uses symbols "<=3D" and "=3D>"? Yes, =3D> is used in CLOCK lines, and in tables (but there only as a display property). > > 2. Does org-mode contains functions for timestamp calculation? I need > something like > (add-to-timestamp "<2007-05-15 =D0=92=D1=82=D1=80>" "+1d") with result = "<2007-05-16=20 > =D0=A1=D1=80=D0=B4>" Org itself uses time-date.el. There are no functions which would make this easy - but it could be easy to write one - base it on org-timestamp-change, but make it read and return strings. - Carsten=