From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik 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 Message-ID: <-5592632147304882443@unknownmsgid> References: <20121011125146.GA24007@boo.workgroup> <20121012151423.GC14562@boo.workgroup> <87sj9j1wv9.fsf@gmail.com> <20121013081221.GA8868@boo.workgroup> <87lifa1y3v.fsf@gmail.com> <20121013184423.GB28000@boo.workgroup> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNHGl-0006NK-Rl for emacs-orgmode@gnu.org; Sun, 14 Oct 2012 02:01:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNHGk-0006l8-Mu for emacs-orgmode@gnu.org; Sun, 14 Oct 2012 02:01:47 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:33349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNHGk-0006ky-Fr for emacs-orgmode@gnu.org; Sun, 14 Oct 2012 02:01:46 -0400 Received: by mail-wg0-f49.google.com with SMTP id gg4so2700078wgb.30 for ; Sat, 13 Oct 2012 23:01:45 -0700 (PDT) In-Reply-To: <20121013184423.GB28000@boo.workgroup> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Gregor Zattler Cc: emacs-orgmode On 13 okt. 2012, at 20:45, Gregor Zattler wrote: > Hi Nicolas, org-mode users and developers, > * Nicolas Goaziou [13. Oct. 2012]: >> Gregor Zattler 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 > -- > -... --- .-. . -.. ..--.. ...-.- >