emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Gregor Zattler <telegraph@gmx.net>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Bug: org-read-date: problem with year in dotted european date input [7.9.2 (release_7.9.2-436-g9b11e6 @ /home/grfz/src/org-mode/lisp/)]
Date: Sun, 14 Oct 2012 08:01:45 +0200	[thread overview]
Message-ID: <-5592632147304882443@unknownmsgid> (raw)
In-Reply-To: <20121013184423.GB28000@boo.workgroup>

On 13 okt. 2012, at 20:45, Gregor Zattler <telegraph@gmx.net> wrote:

> Hi Nicolas, org-mode users and developers,
> * Nicolas Goaziou <n.goaziou@gmail.com> [13. Oct. 2012]:
>> Gregor Zattler <telegraph@gmx.net> writes:
>>
>>> Back to square one: Does anybody know How to customise
>>> Emacs/org-mode so that dotted European dates are parsed correctly
>>> at the date/time prompt?
>>
>> Again, dotted European dates are parsed correctly without customization.
>> Would you provide a time string that isn't?
>
> "Naked" dotted european dates without surrounding text are
> parsed correctly by org-read-date.
>
> But with date/time prompt I mean the prompt which asks me for a
> date/time when invoking org-time-stamp.  Here I'm allowed to
> insert Dates like "the event takes place at 27.10. at 14:00 in
> the pub".  Org-mode is supposed to parse these, see
> [[info:org#The%20date/time%20prompt][info:org#The date/time prompt]].

Org used to have the ambition to parse a date in the middle of a text,
and this six what you are seeing in the documentation. However, over
time more and more different requests came in, to parse ISO weeks,
European dates and more.  Also we want to allow incomplete dates like
leaving out a year etc.  I still think Org does a pretty god job
there.  However, to be reasonably predictable we did have o restrict
matching of special dates to the beginning of the string, and this is
what you and Nicolas are now seeing.  If you want this to work
differently, you need to hack your own version of the analyze
function.  For example, you can remove the ^ anchor from the regexp
matching dotted dates. And you can change the regexp to match two
digit years and not only four digit years. But you will then see that
it also parses numbers with decimals which happen to be in the chunk
of text.

Carsten


>
> If I now yank "Kommt am 27.10.2012 um 14:00 zum" in this
> date/time prompt, the result is "<2010-10-27 Mi 14:00>" instead
> of "<2012-10-27 Sa 14:00>".          ^       ^^
>        ^       ^^
>
>
> I had a look at org-time-stamp which is invoked by "C-c ."  I do
> not understand how this function parses dates/times from text.
> Therefore I looked for functions with appropriate names which are
> called by org-time-stamp.  The only one I could find is
> org-read-date.  It obviously parses dates from a string and
> identifies parts (day, month, year).  I thought org-read-date
> does the heavy lifting with respect to date parsing.  But now I
> think you are right and org-read-dates parses "naked dates".  But
> where does the parsing of texts which contain dates take place?
>
>
>
> Ciao, Gregor
> --
> -... --- .-. . -.. ..--.. ...-.-
>

  reply	other threads:[~2012-10-14  6:01 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-11 12:51 how to customise Emacs to recognise 13.10. as 13th of October this year instead of 2010-10-13? Gregor Zattler
2012-10-11 14:13 ` Memnon Anon
2012-10-11 15:20   ` Gregor Zattler
2012-10-12 15:14 ` Bug: org-read-date: problem with year in dotted european date input [7.9.2 (release_7.9.2-436-g9b11e6 @ /home/grfz/src/org-mode/lisp/)] (was: Re: how to customise Emacs to recognise 13.10. as 13th of October this year instead of 2010-10-13?) Gregor Zattler
2012-10-12 16:24   ` Bug: org-read-date: problem with year in dotted european date input [7.9.2 (release_7.9.2-436-g9b11e6 @ /home/grfz/src/org-mode/lisp/)] Nicolas Goaziou
2012-10-13  8:12     ` Gregor Zattler
2012-10-13 10:10       ` Nicolas Goaziou
2012-10-13 18:44         ` Gregor Zattler
2012-10-14  6:01           ` Carsten Dominik [this message]
2012-10-14  7:57             ` Nicolas Goaziou
2012-10-15  6:39               ` Carsten Dominik
2012-10-15 11:06                 ` Nicolas Goaziou
  -- strict thread matches above, loose matches on Subject: below --
2013-01-24 12:32 How to track down "No heading for this item in buffer or region."? Gregor Zattler
2013-01-24 12:44 ` Bastien
2013-01-24 16:23   ` Gregor Zattler
2013-01-24 19:07     ` Bastien
2013-01-24 19:24     ` Bastien
2013-01-24 19:35       ` Nick Dokos
2013-01-24 20:29         ` Bastien
2013-01-25  5:20           ` Nick Dokos
2013-01-25 16:11             ` J. David Boyd
2013-01-26 10:51             ` Bastien
2013-01-26 16:45               ` Nick Dokos
2013-01-31 10:43                 ` Bastien
2012-01-06  0:21 How to debug "org-clock-display: Args out of range: [48230 48230 48230 38618 38618 0 0 0 0 0 ...], 61" Gregor Zattler
2012-01-06  1:01 ` Bernt Hansen
2012-01-12 21:41   ` Gregor Zattler
2012-01-15 23:07     ` Bernt Hansen
2011-11-10 19:08 Getting rid of split frame with org-capture Thomas Lockney
2011-11-12 15:57 ` Gregor Zattler
     [not found]   ` <telegraph@gmx.net>
2011-11-13  4:13     ` Nick Dokos
2011-11-13 16:48       ` Tom Prince
2011-11-13 17:57         ` Nick Dokos
2011-11-20 16:16           ` Tom Prince
2011-12-13 23:11             ` Andreas Leha
2011-12-14 16:37               ` Tom Prince
2013-10-04  4:33                 ` Alexander Vorobiev
2013-10-04  7:06                   ` Alan Schmitt
2011-11-25 16:35           ` Eric S Fraga
2012-01-12 22:12     ` How to debug "org-clock-display: Args out of range: [48230 48230 48230 38618 38618 0 0 0 0 0 ...], 61" Nick Dokos
2012-01-12 22:56       ` Nick Dokos
2012-01-14 16:16         ` [BUG] org-clock-sum cannot handle headings with more than 29 stars (was: Re: How to debug "org-clock-display: Args out of range: [48230 48230) " Gregor Zattler
2012-01-15 15:33         ` How to debug "org-clock-display: Args out of range: [48230 48230 " Stefan Nobis
2012-01-14 18:49     ` [BUG] org-clock-sum cannot handle headings with more than 29 stars (was: Re: How to debug "org-clock-display: Args out of range: [48230 48230) " Nick Dokos
2012-01-22 12:50       ` [BUG][PATCH] document number of stars limitation with respect to org-clock-sum (was: Re: org-clock-sum cannot handle headings with more than 29 stars) Gregor Zattler
2012-01-22 13:15         ` [PATCH 2/3] Document max number of stars in headings in manual Gregor Zattler
2012-01-24 16:10           ` [Accepted] [O, " Bastien Guerry
2012-01-22 13:15         ` [PATCH 1/3] Document max number of stars in headings in docstring of org-inlinetask-minlevel Gregor Zattler
2012-01-24 16:10           ` [Accepted] [O, " Bastien Guerry
2012-01-22 13:30         ` [PATCH 3/3] Document max number of stars in clocking section Gregor Zattler
2012-01-24 16:11           ` [Accepted] [O, " Bastien Guerry
2012-01-24 16:16         ` [BUG][PATCH] document number of stars limitation with respect to org-clock-sum Bastien
2012-10-14  5:31     ` Bug: org-read-date: problem with year in dotted european date input [7.9.2 (release_7.9.2-436-g9b11e6 @ /home/grfz/src/org-mode/lisp/)] Nick Dokos
2013-01-24 18:10     ` How to track down "No heading for this item in buffer or region."? Nick Dokos
2013-01-24 18:31     ` Nick Dokos
2011-11-13 20:41 ` Getting rid of split frame with org-capture Nick Dokos

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=-5592632147304882443@unknownmsgid \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=telegraph@gmx.net \
    /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).