From 8953d671b5ce15c96cb9b992a9783148f7867bcc Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 27 Oct 2025 20:39:09 -0500 Subject: 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). --- modules/org-gcal-config.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'modules/org-gcal-config.el') 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)) -- cgit v1.2.3