Browse Source

Fix bug that would show empty todo list on extended todays

* lisp/org-agenda.el (org-agenda-get-day-entries): Compare DATE with
modified today.

When a user sets org-extend-today-until, the agenda TODO list would
come up empty when requested in the extension period between midnight
and org-extend-today-until.  This problem is new, it was caused by a
patch that introduced the function org-today and used it also
in org-todo-list.

The reason why this caused a problem is a bit difficult.  The agenda
need a date to be defined, and getting todo entries is subject to the
current date being today.  This is a leftover condition from the times
when the TODO list was often part of the daily agenda listing, and the
test is there to avoid that the TODO list comes also up when looking
at the agenda for tomorrow.  Much of this is irrelevant now, because
people use either block agendas, or separate views - but the old
functionality is retained for backward compatibility.

This patch fixes the problem by making `org-agenda-get-day-entries'
check for the date computed by `org-today'.
Carsten Dominik 8 years ago
1 changed files with 2 additions and 1 deletions
  1. 2 1

+ 2 - 1

@@ -4482,7 +4482,8 @@ the documentation of `org-diary'."
 	      (while (setq arg (pop args))
 		 ((and (eq arg :todo)
-		       (equal date (calendar-current-date)))
+		       (equal date (calendar-gregorian-from-absolute
+				    (org-today))))
 		  (setq rtn (org-agenda-get-todos))
 		  (setq results (append results rtn)))
 		 ((eq arg :timestamp)