dengste / org-caldav

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

Sync calendar in batch mode (noninteractively) #242

Closed lytex closed 3 years ago

lytex commented 3 years ago

I would like to sync with a remote calendar by running emacs in batch mode, but I'm not able to do so. I've tried to call org-caldav by using these commands, but none of them seem to work: the command exits almost immediately and when I sync interactively, it takes at least one minute.

emacs --batch --eval="'(progn (load-file \"$HOME/.emacs.d/early-init.el\") (load-file \"$HOME/.emacs.d/init.el\") (add-to-list 'auth
-sources \"~/.authinfo\") (org-caldav-sync) )"

I've also tried to call another functions to perform the sync, but the result is the same

(call-interactively 'org-caldav-sync)
(org-caldav-sync-calendar)

How can I call org-caldav-sync noninteractively?

lytex commented 3 years ago

Ok, there was a quote before all the code, so it wasn't being executed:

↓
'(progn ...