emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: "Łukasz Stelmach" <lukasz.stelmach@iem.pw.edu.pl>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] more problems with future timestamps
Date: Fri, 26 Feb 2010 10:08:56 +0100	[thread overview]
Message-ID: <94AF1E01-6768-4221-876B-8674593152A4@gmail.com> (raw)
In-Reply-To: <87fx4puhgj.fsf@dasa3.iem.pw.edu.pl>

Hi Lukasz,

On Feb 25, 2010, at 10:35 PM, Łukasz 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  
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- 
> iso)

Also this problem is fixed now.

- Carsten

      reply	other threads:[~2010-02-26  9:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-25 21:35 [BUG] more problems with future timestamps Łukasz Stelmach
2010-02-26  9:08 ` Carsten Dominik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=94AF1E01-6768-4221-876B-8674593152A4@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=lukasz.stelmach@iem.pw.edu.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).