GNU Emacs iCalendar Import

siehe auch GNU Emacs Manual: 38.12 Importing and Exporting Diary Entries .

(require 'url)
(require 'icalendar)

(defconst dualis-url "https://10.2.2.21/dhbwcalendar/ics")
(defconst dualis-do-not-ask t)

(defun dualis-import ()
  (let ((buffer (url-retrieve-synchronously dualis-url)))
    (save-excursion
      (set-buffer buffer)
      (icalendar-import-buffer nil dualis-do-not-ask)
      (kill-buffer (current-buffer)))))