19

It seems that the various methods of calendar integration have not been working well. The tutorial on worg is outdated and the function is now called org-icalender-export-to-ics. However running this function on an .org file gives me an .ics file which does not have any entry:

BEGIN:VCALENDAR
VERSION:2.0
X-WR-CALNAME:Personal
PRODID:-//Xiang Ji//Emacs with Org mode//EN
X-WR-TIMEZONE:HKT
X-WR-CALDESC:
CALSCALE:GREGORIAN
END:VCALENDAR

I used to use mobileorg to directly sync with Google Calendar on Android. However the project has long been out of maintenance and recently I haven't been able to sync any of my org files with mobileorg at all, with various undecipherable errors occuring.

All I need is to sync those entries with SCHEDULED and DEADLINE to my calendar so that I can also check on them when I'm on my cellphone.

There has been a similar question on Reddit but none of the solutions mentioned there have been able to achieve this end.

xji
  • 2,545
  • 17
  • 36

2 Answers2

8

Turns out the reason why the exported ics files was empty was because I didn't customize the variables related to ical export. I had to run customize-group on org-export-icalender and change quite a few parameters. I changed org-icalendar-use-scheduled, org-icalendar-use-deadline, org-icalendar-include-body org-icalendar-timezone, org-icalendar-store-UID. It seems that Google Calendar would only recognize type VEVENT in ics files. VTODO will not get recognized, so I had to make sure that the export generates VEVENT from SCHEDULED and DEADLINE entries. I'd say the default options were a bit not user-friendly though. And those customizations seem to not be mentioned in the worg guide.

xji
  • 2,545
  • 17
  • 36
  • 1
    If you 1) export the ICS, 2) import into GCal, 3) reschedule an event, 4) reexport the ICS, 5) import into GCal, will that result in duplicating the rescheduled event? –  Aug 23 '15 at 19:40
  • 1
    @blujay No. `org-icalendar-store-UID` is there to ensure the same events get the same UID. Also there's no need to re-import. I think Google Calendar automatically checks once in a while to see whether the file is updated and thus new events are added. I store the ics file in Dropbox's `Public` folder. – xji Aug 24 '15 at 03:58
  • 1
    Thank you. I will have to give this a try. If only it were bi-directional! :D –  Aug 24 '15 at 22:09
3

If you want a two-way sync with google calender, perhaps you should try org-caldav (https://github.com/dengste/org-caldav)? I have been using it for some time with mixed, mostly positive, results.

Niclas Börlin
  • 618
  • 5
  • 15