DRAFT -- compatible with org-mode
version 9.0.4?
The function org-agenda-skip-deadline-if-not-today
is designed to be used in conjunction with the org-agenda-skip-function
and an agenda
entry in the org-agenda-custom-commands
that contains proposed entries such as:
(org-agenda-span 'day)
(org-agenda-skip-function '(org-agenda-skip-deadline-if-not-today))
(org-agenda-entry-types '(:deadline))
(defun org-agenda-skip-deadline-if-not-today ()
"If this function returns nil, the current match should not be skipped.
Otherwise, the function must return a position from where the search
should be continued."
(ignore-errors
(let ((subtree-end (save-excursion (org-end-of-subtree t)))
(deadline-day
(time-to-days
(org-time-string-to-time
(org-entry-get nil "DEADLINE"))))
(now (time-to-days (current-time))))
(and deadline-day
(not (= deadline-day now))
subtree-end))))
COMPATIBLE WITH ORG-MODE 8.2.10
Emacs version 25.1 ships with org-mode
version 8.2.10. Within said release, there is an undocumented dynamically scoped variable called org-agenda-only-exact-dates
, which can be used to accomplish the goal of the original poster. Within the org-agenda-custom-commands
, set (org-agenda-only-exact-dates t)
.