1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

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'.
This commit is contained in:
Carsten Dominik 2011-02-04 17:47:03 +01:00
parent 712031900f
commit 73be48bdf9

View File

@ -4482,7 +4482,8 @@ the documentation of `org-diary'."
(while (setq arg (pop args))
(cond
((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)