diff options
| author | Craig Jennings <c@cjennings.net> | 2026-03-09 23:40:26 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-03-09 23:40:26 -0500 |
| commit | 4080daf948b23d0b6b59394623e12983f0a9cfad (patch) | |
| tree | 88a190369d5ecf29ecc03ad94c0808137224c370 /modules | |
| parent | 3b120b35fff1e21114c7ff189def31b538c7a2ac (diff) | |
fix(calendar-sync): handle variable-length date lists in RRULE UNTIL
date-to-time used (reverse date) which broke when RRULE UNTIL values
were parsed as 5-element lists (year month day hour minute) from UTC
timestamps. This caused recurring events with UTC UNTIL dates to
expand to 0 occurrences, producing stale calendar entries.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/ai-config.el | 6 | ||||
| -rw-r--r-- | modules/calendar-sync.el | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/modules/ai-config.el b/modules/ai-config.el index 651acc74..d3765ab8 100644 --- a/modules/ai-config.el +++ b/modules/ai-config.el @@ -93,9 +93,10 @@ Call this only after loading `gptel' so the backend constructors exist." "o1" ) :stream t))) - ;; Set default backend + ;; Set default backend and model (unless gptel-backend - (setq gptel-backend (or gptel-claude-backend gptel-chatgpt-backend)))) + (setq gptel-backend (or gptel-claude-backend gptel-chatgpt-backend)) + (setq gptel-model "claude-opus-4-6"))) ;; ------------------ GPTel Conversation And Utility Commands ------------------ @@ -325,6 +326,7 @@ Works for any buffer, whether it's visiting a file or not." (cj/ensure-gptel-backends) ;; Set Claude as default after initialization (setq gptel-backend gptel-claude-backend) + (setq gptel-model "claude-opus-4-6") (setq gptel-confirm-tool-calls nil) ;; allow tool access by default diff --git a/modules/calendar-sync.el b/modules/calendar-sync.el index 106c87f7..610281d2 100644 --- a/modules/calendar-sync.el +++ b/modules/calendar-sync.el @@ -894,9 +894,13 @@ Returns string like '<2025-11-16 Sun 14:00-15:00>' or '<2025-11-16 Sun>'." ;;; Helper Functions (defun calendar-sync--date-to-time (date) - "Convert DATE (year month day) to time value for comparison. -DATE should be a list like (year month day)." - (apply #'encode-time 0 0 0 (reverse date))) + "Convert DATE to time value for comparison. +DATE should be a list starting with (year month day ...). +Only the first three elements are used; extra elements (hour, minute) are ignored." + (let ((day (nth 2 date)) + (month (nth 1 date)) + (year (nth 0 date))) + (encode-time 0 0 0 day month year))) (defun calendar-sync--before-date-p (date1 date2) "Return t if DATE1 is before DATE2. |
