Function: org-agenda-dim-blocked-tasks
org-agenda-dim-blocked-tasks is an interactive and byte-compiled
function defined in org-agenda.el.gz.
Signature
(org-agenda-dim-blocked-tasks &optional INVISIBLE)
Documentation
Dim currently blocked TODOs in the agenda display.
When INVISIBLE is non-nil, hide currently blocked TODO instead of dimming them.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-agenda.el.gz
(defun org-agenda-dim-blocked-tasks (&optional _invisible)
"Dim currently blocked TODOs in the agenda display.
When INVISIBLE is non-nil, hide currently blocked TODO instead of
dimming them." ;FIXME: The arg isn't used, actually!
(interactive "P")
(when (called-interactively-p 'interactive)
(message "Dim or hide blocked tasks..."))
(dolist (o (overlays-in (point-min) (point-max)))
(when (eq (overlay-get o 'face) 'org-agenda-dimmed-todo-face)
(delete-overlay o)))
(save-excursion
(let ((inhibit-read-only t))
(goto-char (point-min))
(while (let ((pos (text-property-not-all
(point) (point-max) 'org-todo-blocked nil)))
(when pos (goto-char pos)))
(let* ((invisible
(eq (org-get-at-bol 'org-todo-blocked) 'invisible))
(todo-blocked
(eq (org-get-at-bol 'org-filter-type) 'todo-blocked))
(ov (make-overlay (if invisible
(line-end-position 0)
(line-beginning-position))
(line-end-position))))
(when todo-blocked
(overlay-put ov 'face 'org-agenda-dimmed-todo-face)
;; Override other overlays.
(overlay-put ov 'priority 50))
(when invisible
(org-agenda-filter-hide-line 'todo-blocked)))
(if (= (point-max) (line-end-position))
(goto-char (point-max))
(move-beginning-of-line 2)))))
(when (called-interactively-p 'interactive)
(message "Dim or hide blocked tasks...done")))