(defun z/save-meeting-to-ics ()
"If the current file is in '~/.dotfiles', the code blocks are tangled"
(when (equal (buffer-file-name)
(expand-file-name "/home/zeltak/org/files/agenda/
meetings.org"))
(rename-file (org-icalendar-export-to-ics) "/home/zeltak/org/files/export/kcal.ics")
(message "exported to ics")))
;;run every 30 minutes
(run-with-timer 0 (* 30 60) 'z/save-meeting-to-ics)
;;(run-with-idle-timer 600 t #'org-agenda-redo) ;; to rebuild it every 600 second
;; (add-hook 'after-save-hook #'z/save-meeting-to-ics)