dengste / org-caldav

Caldav sync for Emacs orgmode
GNU General Public License v3.0
712 stars 105 forks source link

org-caldav-files default value causes error? #292

Open jlesieutre opened 7 months ago

jlesieutre commented 7 months ago

By default org-caldav-files is set to include ~/org/appointments.org. When I don't touch this setting and run org-caldav-sync it prompts me to create this file and then throws an error when I decline.

I have set my calendar file in org-caldav-inbox (which is included in org-caldav-files automatically) and am not interested in syncing anything else. So to get this to run I need to set org-caldav-files to nil before running the command, or otherwise it tries to sync the nonexistent ~/org/appointments.org.

I would suggest that either org-caldav-files be nil by default, or that the "In a Nutshell" instructions clarify that it must be changed to something other than ~/org/appointments.org (perhaps nil) to avoid errors.

(I had not run org-caldav-sync in several months, but never got this error until recently, so I assume some default setting has changed.)

jackkamm commented 7 months ago

I agree it would be better if this were nil by default, and I pushed a change to that effect, but then reverted it shortly thereafter when I realized it could potentially be a breaking change (if someone was relying on ~/org/appointments.org but using a separate inbox file, this change could potentially mess up their remote calendar).

No default settings were changed intentionally on this. I'm guessing there was an unintentional change that requires files in org-caldav-files to exist -- perhaps in the past org-caldav-sync did not fail due to missing files in there.

jackkamm commented 5 months ago

I've updated the documentation in https://github.com/dengste/org-caldav/pull/294, and it now lists org-caldav-files as a required configuration variable in "Basic setup" (formerly "In a nutshell").

However I leave this issue open because I still would like to change org-caldav-files eventually. My current thinking is this:

  1. Change default value of org-caldav-files to the symbol deprecated-default. The default will behave as before, but on sync will issue a warning that the default value will change in future (but the warning will be omitted if org-caldav-inbox is still appointments.org)
  2. Add a section to the Readme for "Breaking changes (past and upcoming)". Add a notice that org-caldav-files will change to nil in future. (This Readme section will also be useful to announce other breaking changes in org-caldav or upstream in Org, e.g. the change referenced in this commit https://github.com/dengste/org-caldav/commit/618bf4cdc9be140ca1993901d017b7f18297f1b8)
  3. After a period of 6-12 months, finally change org-caldav-files to nil

Alternatively we might just make org-caldav-files robust to missing files.