From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Status google calendar sync Date: Sat, 11 Jun 2011 14:38:50 -0400 Message-ID: <4788.1307817530@alphaville.dokosmarshall.org> References: <8762t3idd3.fsf@gmx.ch> <4D48E887.20900@gmail.com> <5E7BEB01-1411-4BF4-A36B-C4FF43E55CF6@fastmail.net> <6843D3C6-E3B7-4D31-9F4C-163FA3770D71@fastmail.net> <4DF24E8E.5010200@lbl.gov> <4DF26BD0.4000001@lbl.gov> <874o3wa4b7.fsf@nzebook.haselwarter.org> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVTBN-00084r-GQ for emacs-orgmode@gnu.org; Sat, 11 Jun 2011 14:45:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QVTBM-0002zz-Ai for emacs-orgmode@gnu.org; Sat, 11 Jun 2011 14:45:17 -0400 Received: from vms173017pub.verizon.net ([206.46.173.17]:47182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVTBM-0002zi-7P for emacs-orgmode@gnu.org; Sat, 11 Jun 2011 14:45:16 -0400 Received: from alphaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173017.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LMN00JZJ2QXS7K0@vms173017.mailsrvcs.net> for emacs-orgmode@gnu.org; Sat, 11 Jun 2011 13:45:02 -0500 (CDT) In-reply-to: Message from Philipp Haselwarter of "Sat, 11 Jun 2011 15:25:00 +0200." <874o3wa4b7.fsf@nzebook.haselwarter.org> 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: Philipp Haselwarter Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Philipp Haselwarter wrote: > Unfortunately, both the awk script and the org-export-icalendar seem to > have quite a hard time with repeating entries. > ical2org does not honor RRULE at all, the export has some very basic and > very fragile support, but anything like > <%%(org-diary-class 16 02 2011 18 05 2011 3)> > or > SCHEDULED: <2011-02-20 Sun +1w -2d> > already fails it. > > I think this is an important topic, especially wrt mobile devices. > Better interoperability with other calendering systems would greatly > benefit the org user experience. > I agree - I have been thinking (unfortunately mostly only thinking) about it and it seems to me that many of the pieces are there, but there is a non-trivial amount of work to do this and do it right: o icalendar.el should be the basis of this, but unfortunately, it is too closely tied to the diary (and is incomplete or buggy in various ways). o It should be refactored to convert between an iCalendar file and a generic in-memory representation of a calendar: basically an attributed tree where the root is the VCALENDAR element, with VEVENTs, VTODOs, VALARMs etc. i.e. all the other elements underneath, each decorated with the various parameters that apply to it. The representation should make it easy to do the next step. o Converters between the generic in-memory representation and various other formats (diary, org) are then needed. o The refactoring of the original icalendar.el will essentially do this for a diary representation. An org converter along these lines can then be fairly easily written I think. o These converters are ripe for what Kernighan and Plauger call a "left-corner" development approach: just bite the smallest useful subset and add features as needed, deliberately and carefully. Both the current implementation of org-icalendar and Eric F.'s awk script would be useful in this respect: they basically cover the basic functionality needed (but perhaps not completely, as Philipp points out). I've been working on this along these lines, but time constraints have made progress almost imperceptibly slow. BTW, the reason I've become interested in this is that recently I started being bombarded with meeting invitations generated from (what else?) M$ Outlook. My former method of adding the invitations to my Org appointment book by hand is just not sufficient any longer. So I have mercilessly hacked icalendar.el to invoke an org-capture with the details, so I can just look it over and file it quickly. At the other end, I modify the mh-e show hook to scan the message for text/calendar attachments and kick off the icalendar stuff. But it's not working very well yet, the hacked icalendar implementation is ugly (think Medusa- turns-you-to-stone-if-you-look-at-it-ugly) and there are bugs (the most serious of which is the icalendar timezone stuff that I referred to in a recent thread). I'm trying to fixg the bugs and am working on the back-end usability stuff in order to survive the onslaught - but the icalendar stuff in the middle is likely to remain unspeakably ugly in the foreseeable future - I just have no time for it. So if anybody is interested, I hope this is useful as a starting point. Nick