Reverted Fix#1 (@ URL encoding) - caused URL parser issues and was unnecessary.
Fix#2 (updated): 775 events have @google.com UIDs. Emacs URL parser
misinterprets literal @ in path as userinfo separator, connecting to
wrong host -> 5 retries all fail -> crash.
Solution: before-advice on org-caldav-update-events-in-org marks all
@google.com UIDs as 'ignored' before the retrieval loop starts. Org-caldav
natively skips 'ignored' events. Logged to *org-caldav-debug*.
Fix#2 around-advice: catch any remaining errors in update-events-in-org
so sync state is saved even if individual events fail.
Fix#3 (unchanged): set-sequence-number fallback for PUT failures.
org-caldav-set-sequence-number calls org-caldav-get-event to read current
SEQUENCE before pushing updates. If server GET fails (network timeout,
Emacs URL library issue), the entire org->cal PUT phase crashes.
Fix: condition-case wraps the function. On error, log to *org-caldav-debug*
and return normally (event is pushed without SEQUENCE update - server handles it).
Note: event EXISTS on server (HTTP 200 confirmed), but Emacs URL library
appears to fail intermittently for this specific UID during PUT phase.
Two patches in org-caldav use-package! config:
Fix#1: org-caldav-get-event encodes @ as %40 via url-hexify-string.
Baikal stores files with literal @ in filename (e.g. ...@google.com.ics).
Result: HTTP 404 after 5 retries for UIDs with @google.com suffix.
Advice: cl-letf temporarily replaces url-hexify-string to decode %40 back to @.
Fix#2: Some CalDAV events have nil SUMMARY/DTSTART. icalendar parser
returns nil, org-caldav passes to string-match -> Wrong type argument: stringp nil.
Advice: condition-case in org-caldav-update-events-in-org catches the error,
logs it to *org-caldav-debug* buffer, and allows sync state to be saved.
Baikal server is configured for Basic auth (dav_auth_type: Basic).
Previous Digest auth approach was wrong. New approach:
- my/caldav-preregister-basic-auth reads credentials from auth-source (~/.authinfo)
- Pre-registers in url-basic-auth-storage to bypass auth-source retries during requests
- Gives clear error if ~/.authinfo not configured
- Removed family calendar sync (was failing; can be added later)
Server-side: dav_auth_type changed to Basic in baikal.yaml (HTTPS = secure).
Config simplified — no Digest hackery, standard authinfo works natively.
~/.authinfo: machine cal.apps.sukany.cz login martin password PASS
machine cal.apps.sukany.cz login family password PASS
Baikal requires Digest auth (not Basic). Pre-register credentials from
~/.authinfo using url-digest-auth-user-pass before org-caldav-sync.
SPC o c now calls my/org-caldav-sync wrapper.
Like org-agenda, snap cursor to task name when navigating headings
in normal state. Uses buffer-local post-command-hook — fires only when
on a heading and cursor is before the task name.
- cperl-mode with perltidy formatter and LSP
- Python with ruff formatter and pyright LSP
- Go with gopls and goimports
- Ansible/YAML with ansible-lint
- Terraform with terraform-ls LSP
- Dockerfile/Podman with hadolint
- SPC m f/r/t/b/d keybindings per language