Skip to content

Instantly share code, notes, and snippets.

Created Sep 14, 2021
What would you like to do?
sync org files with caldav (one way)
#!/usr/bin/emacs --script
;; config
;; storing creds in authinfo
;; MELPA and use-package stuff -------------------------------------------------
(require 'package)
(add-to-list 'package-archives '("melpa" . "") t)
(require 'use-package))
;; -----------------------------------------------------------------------------
(use-package org-caldav
:ensure t
(setq org-caldav-url
(setq org-caldav-calendar-id "")
(setq org-caldav-inbox (expand-file-name "~/orgzly/"))
(setq org-caldav-files (mapcar 'expand-file-name `("~/orgzly/")))
(setq org-caldav-sync-direction 'org->cal)))
(setq org-icalendar-include-todo 'all
org-icalendar-use-deadline '(event-if-not-todo todo-due)
org-icalendar-use-scheduled '(todo-start event-if-todo event-if-not-todo)
org-icalendar-with-timestamps t)
;; does all the work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment