Compare commits

...

2 Commits

Author SHA1 Message Date
hermione
b729ee8c7a fix(emacs): use assoc instead of assq for UNTIL lookup in org-caldav advice
All checks were successful
CI / check (push) Successful in 3m48s
assq uses eq for key comparison, which can fail if the key symbols aren't
identical objects. assoc uses equal, which is what org-caldav itself uses
for rrule-props lookups (e.g., INTERVAL, FREQ).

This fixes DEADLINEs not being added to recurring events with UNTIL dates.

Also adds debug logging to help diagnose any remaining issues - will be
removed once verified working.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 12:46:11 -08:00
nixos_configs/crew/hermione
ebc28cebd4 fix(emacs): improve rbw password error handling
Show clear error message when rbw entry not found instead of
embedding error text in URLs/credentials.
2026-01-25 12:46:11 -08:00

View File

@@ -167,7 +167,12 @@
"Advice to add DEADLINE for UNTIL in recurring events."
(let ((result (funcall orig-fun eventdata-alist)))
(let* ((rrule-props (alist-get 'rrule-props eventdata-alist))
(until-str (cadr (assq 'UNTIL rrule-props))))
(until-str (cadr (assoc 'UNTIL rrule-props)))
(summary (alist-get 'summary eventdata-alist)))
;; Debug: log what we're seeing (remove after debugging)
(when rrule-props
(message "CALDAV-DEBUG: %s | rrule-props: %S | until: %s"
(or summary "?") rrule-props until-str))
(when until-str
(save-excursion
(org-back-to-heading t)
@@ -187,10 +192,13 @@
)
(defun my/get-rbw-password (alias)
"Return the password for ALIAS via rbw, unlocking the vault only if needed."
(let* ((cmd (format "rbw get %s 2>&1" alias))
(output (shell-command-to-string cmd)))
(string-trim output)))
"Return the password for ALIAS via rbw, unlocking the vault only if needed.
Returns nil and signals an error if the entry is not found."
(let* ((cmd (format "rbw get %s 2>/dev/null" (shell-quote-argument alias)))
(output (string-trim (shell-command-to-string cmd))))
(if (string-empty-p output)
(user-error "rbw: no entry found for '%s' - run: rbw add %s" alias alias)
output)))
(after! gptel
:config