From 2837712f5ce5a5a0ded42271a9bb709327bdb81e Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Fri, 20 Dec 2024 11:53:39 +0100 Subject: [PATCH] Completely redo agenda buffers when jumping to today This allows stale buffers from previous days to be updated in one go. --- init.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index d0ad255..155424c 100644 --- a/init.el +++ b/init.el @@ -789,7 +789,12 @@ ;; bound, resulting in some prior calls of `org-read-date' to ignore ;; the hh:mm part. So let's bind this variable now to make things ;; work. - (defvar org-time-was-given nil))) + (defvar org-time-was-given nil) + + ;; Completely redo agenda buffer when jumping to today; this ensures that agenda views + ;; from previous days get updated as expected. + (define-advice org-agenda-goto-today (:before () redo-all) + (org-agenda-redo-all)))) (use-package org-cycle :autoload (org-cycle-hide-drawers)