Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to mark events as managed by org-gcal for purposes of org-gcal-sync #127

Closed
telotortium opened this issue Feb 25, 2021 · 0 comments · Fixed by #129
Closed

Ability to mark events as managed by org-gcal for purposes of org-gcal-sync #127

telotortium opened this issue Feb 25, 2021 · 0 comments · Fixed by #129
Assignees
Labels
enhancement New feature or request

Comments

@telotortium
Copy link
Collaborator

telotortium commented Feb 25, 2021

Overview

Currently, I mainly use org-gcal-fetch, not org-gcal-sync, to avoid accidentally modifying shared events that I've fetched. I'd like to be able to use org-gcal-sync to be able to manage events associated with Org mode headlines that I manage in Org mode - clocking time, changing title, description, schedule, etc. Currently I run org-gcal-fetch, and when I want to push changes from a headline in Org mode to the event in Google Calendar, I manually run org-gcal-post-at-point. This is cumbersome if you manage a lot of events in Org mode files and are subscribed to a lot of shared calendars as well.

I'm envisioning adding a property org-gcal-managed to all events with calendar-id and entry-id properties. This property will have two values:

  • org: Event is intended to be managed primarily by org-gcal. These events will be pushed to Google Calendar by org-gcal-sync, org-gcal-sync-buffer, and org-gcal-post-at-point if they have been modified in the Org file. If the ETag is out of sync with Google Calendar, the Org headline will still be updated from Google Calendar.
  • gcal: Event is intended to be managed primarily by org-gcal. These events will not be pushed to Google Calendar by bulk update functions like org-gcal-sync, org-gcal-sync-buffer. When running org-gcal-post-at-point, the user will be prompted to approve pushing the event by default.

The intended end state is that when org-gcal-sync and org-gcal-sync-buffer are run, it will operate like the sync functions operate today on events where org-gcal-managed is set to org, but will operate like org-gcal-fetch and org-gcal-fetch-buffer do on events where org-gcal-managed is set to gcal.

How is the org-gcal-managed property set on events without the property?

I'll create separate defcustom to override the default property values for each of these cases:

  • Event is created via org-gcal-sync or org-gcal-fetch: gcal.
  • Existing event without org-gcal-managed property is updated: gcal.
  • Event is created by org-gcal-post-at-point (i.e., calendar-id and entry-id properties are added to an event previously without them): org.

Updating from previous versions

The above defaults will preserve the previous behavior for previously-downloaded events - all such events will default to gcal. If a user wants to manually set org-gcal-managed to a preferred value, I will document how to programmatically set the property on all events in a buffer.

@telotortium telotortium added the enhancement New feature or request label Feb 25, 2021
@telotortium telotortium self-assigned this Feb 25, 2021
telotortium added a commit to telotortium/org-gcal.el that referenced this issue Feb 27, 2021
telotortium added a commit to telotortium/org-gcal.el that referenced this issue Feb 27, 2021
telotortium added a commit to telotortium/org-gcal.el that referenced this issue Mar 3, 2021
telotortium added a commit to telotortium/org-gcal.el that referenced this issue Mar 3, 2021
telotortium added a commit to telotortium/org-gcal.el that referenced this issue Mar 4, 2021
telotortium added a commit to telotortium/org-gcal.el that referenced this issue Mar 13, 2021
telotortium added a commit to telotortium/org-gcal.el that referenced this issue Apr 6, 2021
telotortium added a commit to telotortium/org-gcal.el that referenced this issue Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant