From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ruslan Kosolapov Subject: thoughts: "formulas for timestamps" feature Date: Fri, 01 Jun 2007 21:20:50 +0700 Message-ID: <87vee7zrgd.fsf@kosolapov-nb.plesk.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hu7zu-0006S3-Na for emacs-orgmode@gnu.org; Fri, 01 Jun 2007 10:20:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hu7zs-0006Qt-03 for emacs-orgmode@gnu.org; Fri, 01 Jun 2007 10:20:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hu7zr-0006Qm-MR for emacs-orgmode@gnu.org; Fri, 01 Jun 2007 10:20:55 -0400 Received: from gw-swsoft2.ll-nsk.zsttk.ru ([82.200.65.190] helo=mail3.plesk.ru) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hu7zq-000270-Hz for emacs-orgmode@gnu.org; Fri, 01 Jun 2007 10:20:55 -0400 Received: from kosolapov-nb.plesk.ru (unknown [192.168.62.133]) by mail3.plesk.ru (Postfix) with ESMTP id 5FBC81A9CE1 for ; Fri, 1 Jun 2007 21:20:51 +0700 (NOVST) 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 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 =F7=D4=D2>") =3D> task1 After M-x spread-recalc org file goes to: ** NEW Task1 DEADLINE: "<2007-05-15 =F7=D4=D2>" <=3D (concat "<2007-05-15 =F7=D4=D2= >") =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) - fix spread-mode - remove quotes printing I tried to fix spread-mode, and fail (there are many reasons of it). But if I change org-deadline-time-regexp as follows: - (concat "\\<" org-deadline-string " *<\\([^>]+\\)>") + (concat "\\<" org-deadline-string " *\"?<\\([^>]+\\)>\"?") all works fine. So, I have some questions: 1. Does org-mode uses symbols "<=3D" and "=3D>"? 2. Does org-mode contains functions for timestamp calculation? I need something like=20 (add-to-timestamp "<2007-05-15 =F7=D4=D2>" "+1d") with result "<2007-05-1= 6 =F3=D2=C4>" Now I found only org-timestamp-change, but "Change the date in the time stamp at point" is not what I need (I have no "point", I have a string with timestamp). Of course, I can write such functions by myself, but it is not the true way if such functions already exists. PS: I'm a newbie in emacs lisp, so, sorry if my second question is a stupid one :) --=20 Ruslan Kosolapov Plesk QA Department Second Manager SWsoft, Inc.