diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2011-02-04 17:47:03 +0100 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2011-02-04 17:47:03 +0100 |
commit | 73be48bdf92dbda2a7b700b8cb0c1467c6738d89 (patch) | |
tree | 66cd401c43ae3d2e6783b9fcd96994d19a481d9f | |
parent | 712031900fd8480f70005e4925c04b50d3436b09 (diff) | |
download | org-mode-73be48bdf92dbda2a7b700b8cb0c1467c6738d89.tar.gz |
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'.
-rw-r--r-- | lisp/org-agenda.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index bbe9d8a..16fc3f0 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -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) |