This can be done by setting the variable org-caldav-calendars. It
should be a list of plists (a ’plist’ is simply a list with alternating
:key’s and values). Through these plists, you can override the global
values of variables like org-caldav-calendar-id, and calling
org-caldav-sync will go through these plists in order.
Example:
(setq org-caldav-calendars
'((:calendar-id "work@whatever" :files ("~/org/work.org")
:inbox "~/org/fromwork.org")
(:calendar-id "stuff@mystuff"
:files ("~/org/sports.org" "~/org/play.org")
:skip-conditions (regexp "soccer")
:inbox "~/org/fromstuff.org")) )
This means that you have two calendars with IDs "work@whatever" and
"stuff@mystuff". Both will be accessed through the global value of
org-caldav-url, since the key :url isn’t specified. The calendar
"work@whatever" will be synced with the file ’work.org’ and inbox
’fromwork.org’, while "stuff@mystuff" with ’sports.org’ and
’play.org’, unless there’s the string ’soccer’ in the heading, and
and inbox is ’fromstuff.org’. See the doc-string of
org-caldav-calendars for more details on which keys you can use.