Karl Voit wrote: > * Nick Dokos wrote: > > Karl Voit wrote: > > > > For me, it was a "no time to work on org - stash it"... > > OK. I just wanted to make sure that it *is* on someone's todo list > :-) > > >> * Karl Voit wrote: > >> > > >> > * <2012-03-05 08:00-09:00> Wrong: ends up as full day event > > > > org-agenda-write calls org-export-icalendar which calls org-print-icalendar-entries > > which loops over all the entries and parses them, decomposing them into timestamps. > > Each timestamp is then passed to org-parse-time-string. It's this one that cannot > > handle non-standard formats: it uses a regexp and assumes that all the matched parts > > are going to be in fixed places: > > > > As to how to fix it, there are several possibilities: > > > > 1. fix your scripts that produce time stamps to include day-of-week. > > Sorry, deriving DOW from an arbitrary timestamps from arbitrary data > sources is either pretty time consuming (calendar calculations) or > simply hard to calculate. > > Outside Org-mode, DOW is seldom part of time-stamp data :-( > > > 2. change the callers of org-parse-time-string to make sure that DOW is included. > > There are roughly three dozen callers, so 2. is possible but a pain. > > Ack. > > > 3. change just one caller: org-print-icalendar-entries to make sure that DOW is included. > > 3. is simple but ugly as sin, > > Ouch, ack :-) > > > 4. change org-parse-time-string to handle a missing DOW. > > 4. is the best way to handle it within org. > > Full ack. > > > I vote for 1. where *you* have to do all the work ;-) > > YMMD :-) > > If my brain would be compatible to ELISP, I'd send a patch. > Promised. > > But I'll take my chance and wait for someone else (you?) > implementing 4. to resolve this issue for everybody. I really > appreciate every second you guys invest in maintaining Org-mode! > I don't know about you, but whenever I engage in hand-to-hand combat with a complicated regexp, I come out bruised, muddied and a lot worse for wear. In any case, I'm attaching an org file with my investigations. It contains a description and a code block for testing. I hope that the attachment will come through unscathed: it contains regexps, and munging a regexp that looks like hen scratchings in the first place through uncooperative mailers is not something to be relished. BTW, I'm not advocating a change: I'll leave it to Karl to do that if he really wants to and to the maintainers to decide whether it's worth doing. But it can be done (more or less). And maybe somebody will come up with a better way than the proof-of-concept that I'm attaching here. Nick PS. BTW, if you look at the attachment, it helps if you have a wide window, something like 165 characters wide.