kidd / org-gcal.el

Org sync with Google Calendar. (active maintained project as of 2019-11-06)
436 stars 47 forks source link

One Google Calendar <-> Multiple Org Files ? #113

Closed DSMasterson closed 3 years ago

DSMasterson commented 3 years ago

Does org-gcal support 1<->N relationship between calendar and org files?

The answer to this should be in the Installation Guide

DSMasterson commented 3 years ago

Further explanation:

My workflow uses a number of Org files. I'm wondering, if I create events in each of these Org files, how to collect them up to sync with Google calendar via org-gcal?

Any advise?

kidd commented 3 years ago

The relation is currently 1 to 1 with org files and calendars

telotortium commented 3 years ago

The way that org-gcal works today is this:

  1. By default, there is a 1:1 relation from Calendars to Org files, set in org-gcal-fetch-file-alist:

    (defcustom org-gcal-fetch-file-alist nil
    "\
    Association list '(calendar-id file). For each calendar-id,‘org-gcal-fetch’
    and ‘org-gcal-sync’ will retrieve new events on the calendar and insert
    them into the file."
    :group 'org-gcal
    :type '(alist :key-type (string :tag "Calendar Id") :value-type (file :tag "Org file")))
  2. After the event is fetched, you can move it to another file. org-gcal-fetch will update events moved to other files (by searching from events retrieved from the Calendar API using the Org headline's ID property) if the event has been updated on the server. org-gcal-sync will additionally modify events on the server using the data in your Org files, whether or not the event is located in a file from org-gcal-fetch-file-alist.

  3. org-gcal-fetch-buffer and org-gcal-sync-buffer will do the same, but only operate on events currently present in the current buffer, not retrieve new events.

DSMasterson commented 3 years ago

Thank you! I will experiment with that.

Might I suggest updating the README for this information?