summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-10-27 20:39:09 -0500
committerCraig Jennings <c@cjennings.net>2025-10-27 20:39:09 -0500
commit8953d671b5ce15c96cb9b992a9783148f7867bcc (patch)
treec3ec549229b731b202945942bb1c54e9afff5b3a
parent9bf586f62ac9243af1a80bbe496af60ef3b7fbc3 (diff)
maint:org-gcal: Add forward declarations and update org-gcal usage
Forward declare internal org-gcal variables and functions to improve code clarity. Update use-package declaration with version control information to use my fork of org-gcal (fixes, better testing).
-rw-r--r--modules/org-gcal-config.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/org-gcal-config.el b/modules/org-gcal-config.el
index f3e1b7e0..cc7cab90 100644
--- a/modules/org-gcal-config.el
+++ b/modules/org-gcal-config.el
@@ -38,6 +38,11 @@
(require 'host-environment)
(require 'user-constants)
+;; Forward declare org-gcal internal variables and functions
+(eval-when-compile
+ (defvar org-gcal--sync-lock))
+(declare-function org-gcal-reload-client-id-secret "org-gcal")
+
(defun cj/org-gcal-clear-sync-lock ()
"Clear the org-gcal sync lock.
Useful when a sync fails and leaves the lock in place, preventing future syncs."
@@ -48,7 +53,7 @@ Useful when a sync fails and leaves the lock in place, preventing future syncs."
(defun cj/org-gcal-convert-all-to-org-managed ()
"Convert all org-gcal events in current buffer to Org-managed.
-Changes all events with org-gcal-managed property from 'gcal' to 'org',
+Changes all events with org-gcal-managed property from `gcal' to `org',
enabling bidirectional sync so changes push back to Google Calendar."
(interactive)
(let ((count 0))
@@ -62,6 +67,7 @@ enabling bidirectional sync so changes push back to Google Calendar."
(message "Converted %d event(s) to Org-managed" count)))
(use-package org-gcal
+ :vc (:url "https://github.com/cjennings/org-gcal" :rev :newest)
:defer t ;; unless idle timer is set below
:bind (("C-; g" . org-gcal-sync)
("C-; G" . cj/org-gcal-clear-sync-lock))