dengste / org-caldav

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

Calculating a relative path in `org-caldav-previous-files`? #270

Open johnhamelink opened 1 year ago

johnhamelink commented 1 year ago

Hi there,

Thank you for building this package, it's fantastic! It's made org-agenda much more useful for me.

I'm trying to use it on a few different machines, with different paths. Ideally I'd like to be able to use a function call when the state file is loaded to dynamically define the path to the file, like this:

(setq org-caldav-previous-files `(,(jjh/org-file "events/personal-appointments.org.gpg")))

Alternatively, given the recommendations in the README to move the statefiles close to where the org-files are stored, perhaps the path could be calculated relatively instead of absolutely?

As things stand, I can't perform a synchronisation on another device, because the paths are incorrect in the statefile. If I manually adjust them, I can do the sync again.