Syncing MyKolab with Emacs org-mode

I’ve been trying out using MyKolab.com for syncing my calendar to my mobile phone using their ActiveSync support. MyKolab.com is an email, contacts, calendar and file syncing service that is based in Switzerland, and runs 100% on free and open source software. The company’s CEO is the founder of the FSFE so I have good reason to trust these guys :-)

Anyhow, I just figured out one important piece of my own calendar sync puzzle, so I thought I should share it here: syncing my Emacs org-mode calendar. The main piece is already out there, namely the org-caldav mode by David Engster. Just install that and add something similar to this to your Emacs configuration:

(require 'org-caldav)

;; Insert your own username on the second line, I think you need to add
;; the domain if it isn't mykolab.com, e.g. "foobar@mykolab.ch".
(setq org-caldav-url "https://caldav.mykolab.com/calendars/yourusernamehere")

;; The name of your calendar, typically "Calendar" or similar
(setq org-caldav-calendar-id "Calendar")

;; Local file that gets events added on the phone
(setq org-caldav-inbox "~/doc/org/mobile.org")

;; List of your org files here
(setq org-caldav-files org-agenda-files)

;; This is the tricky part - I needed this to get the time zone right
(setq org-icalendar-timezone "Europe/Helsinki")
(setq org-icalendar-date-time-format ";TZID=%Z:%Y%m%dT%H%M%S")

And you should be set. Just run org-caldav-sync and wait a bit, the first time takes a good while. The only problem I had was trying to sync from many computers, I think org-caldav keeps some local cache of what has been synced, which changes from machine to machine.

Posted by Mats Sjöberg.