1
0
Fork 0

fix(emacs): call sync script from pull-diary

Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
Lucas Sta Maria 2024-01-01 11:20:35 -05:00
parent 45770f7451
commit 6d6f55e3c8
No known key found for this signature in database
GPG key ID: F07FB16A826E3B47

View file

@ -67,8 +67,12 @@
;; Diary-syncing functionality ;; Diary-syncing functionality
(defun pull-diary () (defun pull-diary ()
"MUST sync the calendars prior to running this command" "Syncs the calendars directory and imports the calendars into the diary."
(interactive) (interactive)
;; Sync the calendars directory
(let ((default-directory (expand-file-name "~/.calendars/")))
(shell-command "./sync" "*scratch*"))
;; Import the calendars into the diary
(let* ((diary-file-name (expand-file-name "~/.emacs.d/diary")) (let* ((diary-file-name (expand-file-name "~/.emacs.d/diary"))
(calendar-dir (expand-file-name "~/.calendars/")) (calendar-dir (expand-file-name "~/.calendars/"))
(calendar-file-suffix ".ics") (calendar-file-suffix ".ics")