Ihor Radchenko <[email protected]> writes: >> 1) Using the new library in ox-icalendar to export iCalendar format > > CCing ox-icalendar maintainer. > Jack, may you take a look? We should eventually support the upstream > changes although we do not have to just yet; not until the new library > is a part of Emacs release.
Thanks Richard, this looks like very exciting work. I should have some time in mid-March to look into this. At a glance, two things jump out at me: First, the diary-rrule sexp. This could greatly expand the power of repeaters in Org-mode through the use of diary-timestamps. Also, in org-caldav (which I am currently the de-facto maintainer of), I had previously wished for this [1] as it would allow us to have proper bidirectional sync for complex repeating events, so I am very excited to see you've done this. Second, icalendar-mode.el and syntax highlighting. We've previously discussed wanting to support icalendar export snippets [2], but among other challenges, a major weakness was the lack of syntax highlighting which would make it difficult to write such blocks -- but now I am happy to learn icalendar-mode.el has removed that obstacle. Looking beyond ox-icalendar.el -- I think it would be really, really nice if Org's basic syntax integrated better with iCalendar, analogous to Org's support of LaTeX fragments. It would make Org a lot more powerful -- there are some things (especially around recurrences) that are easy in iCalendar but difficult or impossible in Org (e.g. repeating multiday events). >> 2) Building an Emacs-native iCalendar-to-Org *importer* > > That would be a big project. To make it right, maybe we even need to do > it beyond iCalendar and build a more generate import framework that will > work for other formats, not just iCalendar. > > Richard, in theory, we may utilize ox.el infrastructure for this. But > that would require making iCalendar AST to be compatible with what ox.el > expects. I'll note that we do have an iCal->Org converter in org-caldav, it's mainly meant to be used for syncing with Caldav servers but can also be used standalone (org-caldav-convert-ics-to-datetree). But that importer is rather complex, and also it abuses many private functions in icalendar.el (which I might need to finally fix when Emacs 31 drops). So, rewriting the iCal->Org importer upstream in Org does seem appealing. Ideally, the importer could be a faithful inverse of ox-icalendar, though a major complication is that Org entries and iCalendar VEVENTs are not 1:1 in ox-icalendar (a single Org entry can be exported to many VEVENTs, e.g. if it contains multiple active timestamps -- this causes all sorts of headaches for org-caldav, which requires a 1:1 mapping for bidirectional sync, but uses ox-icalendar for Org->iCal conversion). Anyways, that's enough rambling for now -- I'll probably have more to say in a couple weeks after I've had some time to review your changes. But congratulations and thank you, it looks like impressive work. It seems like now is a good time to think about making some long-desired changes to ox-icalendar, perhaps redesigning it, and perhaps even thinking about making improvements to Org timestamps/repeaters more generally. [1] https://github.com/dengste/org-caldav/pull/216#issuecomment-2366987762 [2] https://list.orgmode.org/[email protected]/
