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

org-caldav just deleted my entire remote calendar #113

Closed
floli opened this issue May 31, 2017 · 2 comments
Closed

org-caldav just deleted my entire remote calendar #113

floli opened this issue May 31, 2017 · 2 comments

Comments

@floli
Copy link

floli commented May 31, 2017

Hello,
I set up org-caldav:

(use-package org-caldav
  :ensure t
  :config (setq org-caldav-url "https://invalid.de/cloud/remote.php/dav/calendars/foli"
                org-caldav-calendar-id "sgskalender_shared_by_franzefn"
                org-caldav-inbox (concat org-directory "/sgs.org")
                org-icalendar-timezone "Europe/Berlin"
                org-caldav-files nil)
)

created an empty sgs.org and called org-caldav-sync. org-caldav now started to delete my entire remote calendar, which was definitely unwanted :-/

Can I configure org-caldav to never touch the remote calendar?

Does setting

                org-caldav-sync-changes-to-org 'all
                org-caldav-delete-org-entries 'always

has this effect?

@dengste
Copy link
Owner

dengste commented May 31, 2017

I cannot reproduce this. org-caldav should only delete an event in a calendar if its ID used to be in an Org file but now isn't anymore. So the only way I can see this happening is when the events in that calendar were synced with org-caldav in the first place, but then you synced again with org-caldav-files set to nil, which would make it look like you deleted the events on the Org side.
Currently there's no way to never delete anything on the calendar side, but it would probably make sense to have a variable for that.
It would probably also make sense to detect that org-caldav-files has changed between syncs. I have to think about that.

dengste pushed a commit that referenced this issue Jun 1, 2017
Save org-caldav-files alongside the sync state, so that we can detect
if files were removed from that list. If so, ask the user whether she
really likes to sync anyway. If a file was really removed, this would
delete all entries from the calendar that were in that file, since
org-caldav will see them as deleted. Mention this in Readme.

Add test for this.
@dengste
Copy link
Owner

dengste commented Jun 1, 2017

I've now added that org-caldav should detect when you remove Org files between two syncs and warn you accordingly. Also, you can now do

(setq org-caldav-delete-calendar-entries 'never)

and calendar events will never get deleted (alternatively, you can use 'ask).

@dengste dengste closed this as completed Jun 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants