From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [BUG] more problems with future timestamps Date: Fri, 26 Feb 2010 10:08:56 +0100 Message-ID: <94AF1E01-6768-4221-876B-8674593152A4@gmail.com> References: <87fx4puhgj.fsf@dasa3.iem.pw.edu.pl> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NkwC1-0000yB-I4 for emacs-orgmode@gnu.org; Fri, 26 Feb 2010 04:09:05 -0500 Received: from [140.186.70.92] (port=36360 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkwBz-0000xb-GW for emacs-orgmode@gnu.org; Fri, 26 Feb 2010 04:09:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NkwBy-0006bJ-6n for emacs-orgmode@gnu.org; Fri, 26 Feb 2010 04:09:03 -0500 Received: from mail-wy0-f169.google.com ([74.125.82.169]:34338) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NkwBy-0006bD-0T for emacs-orgmode@gnu.org; Fri, 26 Feb 2010 04:09:02 -0500 Received: by wyb42 with SMTP id 42so2357940wyb.0 for ; Fri, 26 Feb 2010 01:09:01 -0800 (PST) In-Reply-To: <87fx4puhgj.fsf@dasa3.iem.pw.edu.pl> 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: =?UTF-8?Q?=C5=81ukasz_Stelmach?= Cc: emacs-orgmode@gnu.org Hi Lukasz, On Feb 25, 2010, at 10:35 PM, =C5=81ukasz Stelmach wrote: > EHLo. > > I think the following patch should be applied to handle the future > properly. I belive the year is set by the time this part is reached. > At least that is what I observe using ISO dates. When I write 1-2 > (1 January) I get it in 2010. I guess you mean 2 January? > > --8<---------------cut here---------------start------------->8--- > diff --git a/lisp/org.el b/lisp/org.el > index 8ba782a..3ef2e1c 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -13491,11 +13491,10 @@ user." > (nth 3 tl) (< (nth 3 tl) (nth 3 = nowdecode))) > (prog1 (1+ (nth 4 nowdecode)) (setq futurep t)) > (nth 4 defdecode))) > - year (or (nth 5 tl) > - (if (and org-read-date-prefer-future > + year (if (and org-read-date-prefer-future > (nth 4 tl) (< (nth 4 tl) (nth 4 nowdecode))) > (prog1 (1+ (nth 5 nowdecode)) (setq futurep t)) > - (nth 5 defdecode))) > + (nth 5 defdecode)) > hour (or (nth 2 tl) (nth 2 defdecode)) > minute (or (nth 1 tl) (nth 1 defdecode)) > second (or (nth 0 tl) 0) > --8<---------------cut here---------------end--------------->8--- No, this is not the correct fix - with this code you'd even overrule =20 an explicitly given year, try to type 2010-1-2 I have fixed this bug in a different way. Thanks for the report! > BTW when I write w2 in the org date input minibuffer > > Error in post-command-hook: (void-function calendar-absolute-from-=20 > iso) Also this problem is fixed now. - Carsten