From 25d669dd9d5ae62c53c7acca591a24fa2832dd5d Mon Sep 17 00:00:00 2001 From: Daneel Date: Tue, 24 Feb 2026 22:47:33 +0100 Subject: [PATCH] =?UTF-8?q?fix=20calfw=20sort:=20v=C5=A1echny=20zdroje=20c?= =?UTF-8?q?alfw-org-create-source=20+=20calfw-org--schedule-sorter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/config.el b/config.el index d6a027f..9c37272 100644 --- a/config.el +++ b/config.el @@ -1931,25 +1931,26 @@ current frame." (defun my/open-calendar () "Otevři calfw s barevnými zdroji. Suky=modrá, Klára=žlutá, Rodina=zelená, Agenda=černá. +Všechny zdroje přes calfw-org-create-source → jednotný formát → sort funguje. Falls back to calfw-org-open-calendar pokud něco selže." (interactive) (condition-case err (let ((sources '())) - ;; Agenda zdroj — org-agenda-files, nil = automaticky + ;; Agenda — org-agenda-files (nil = auto) (push (calfw-org-create-source nil "Agenda" "black") sources) - ;; CalDAV soubory — jen pokud existují + ;; CalDAV soubory jako agenda zdroje — stejný formát = sort funguje (dolist (spec '(("Suky" "~/org/caldav/suky.org" "SteelBlue") ("Klára" "~/org/caldav/klara.org" "Gold") ("Rodina" "~/org/caldav/family.org" "ForestGreen"))) (let ((file (expand-file-name (nth 1 spec)))) (when (file-exists-p file) - (push (calfw-org-create-file-source - (nth 0 spec) file (nth 2 spec)) + (push (calfw-org-create-source + (list file) (nth 0 spec) (nth 2 spec)) sources)))) (calfw-open-calendar-buffer :contents-sources (nreverse sources) :view 'month - :sorter 'calfw-sorter-start-time)) + :sorter 'calfw-org--schedule-sorter)) (error (message "calfw colored sources failed (%s), fallback." (error-message-string err)) (calfw-org-open-calendar))))