From 91cd72880ffc8beca0995cc8e3529c9811d93a88 Mon Sep 17 00:00:00 2001 From: "Evgeniy A. Dushistov" Date: Sat, 13 Dec 2025 11:58:20 +0300 Subject: [PATCH] fix: capture of default directory during chronos buffer creation Without this fix, if your current directory was deleted, alarm commands will not work, because of failure during start: "no such directory", and you never know that your timer was expired. --- chronos.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chronos.el b/chronos.el index ca958fb..c0acee5 100644 --- a/chronos.el +++ b/chronos.el @@ -256,6 +256,9 @@ display is unfrozen.") chronos--notification-list nil chronos--update-timer (run-at-time t 1 'chronos--update-display)) (switch-to-buffer chronos--buffer) + ;; to make sure that current directory was valid, if current directory with removed, + ;; so alarm command will work in any case + (setq default-directory "~/") (add-to-list 'kill-buffer-query-functions 'chronos--kill-buffer-query) (add-hook 'kill-buffer-hook 'chronos--cleanup) (chronos-mode))