summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2011-08-24 16:35:36 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2011-08-24 18:32:19 +0200
commitecc6e2fe3feb46cfa583156404f6d8f34a5ae937 (patch)
tree81166ac0ff0e722d8c691678726eed41e6228992
parent25131410f434fda91082d0b7b6d8066c41a1e259 (diff)
downloadorg-mode-ecc6e2fe3feb46cfa583156404f6d8f34a5ae937.tar.gz
org-agenda: refactor code in `org-agenda-dim-blocked-tasks'
-rw-r--r--lisp/org-agenda.el14
1 files changed, 3 insertions, 11 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 8d869be..b157d39 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3198,17 +3198,9 @@ the global options and expect it to be applied to the entire view.")
(setq org-blocked-by-checkboxes nil invis1 invis)
(let ((marker (org-get-at-bol 'org-hd-marker)))
(when (and marker
- (not (with-current-buffer (marker-buffer marker)
- (save-excursion
- (goto-char marker)
- (if (org-entry-get nil "NOBLOCKING")
- t ;; Never block this entry
- (run-hook-with-args-until-failure
- 'org-blocker-hook
- (list :type 'todo-state-change
- :position marker
- :from 'todo
- :to 'done)))))))
+ (with-current-buffer (marker-buffer marker)
+ (save-excursion (goto-char marker)
+ (org-entry-blocked-p))))
(if org-blocked-by-checkboxes (setq invis1 nil))
(setq b (if invis1
(max (point-min) (1- (point-at-bol)))