瀏覽代碼

Dependencies: New property NOBLOCKING

A NOBLOCKING property makes sure that an entry is never blocked by
whatever function in org-blocker-hook.
Carsten Dominik 16 年之前
父節點
當前提交
99c7dacd66
共有 3 個文件被更改,包括 16 次插入6 次删除
  1. 5 0
      lisp/ChangeLog
  2. 8 6
      lisp/org-agenda.el
  3. 3 0
      lisp/org.el

+ 5 - 0
lisp/ChangeLog

@@ -1,5 +1,10 @@
 2009-04-08  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org.el (org-todo): Honor the NOBLOCKING property.
+
+	* org-agenda.el (org-agenda-dim-blocked-tasks): Honor the
+	NOBLOCKING property.
+
 	* org.el (org-scan-tags): Fix bug in tag scanner
 
 2009-04-07  Carsten Dominik  <carsten.dominik@gmail.com>

+ 8 - 6
lisp/org-agenda.el

@@ -2424,12 +2424,14 @@ bind it in the options section.")
 		     (not (with-current-buffer (marker-buffer marker)
 			    (save-excursion
 			      (goto-char marker)
-			      (run-hook-with-args-until-failure
-			       'org-blocker-hook
-			       (list :type 'todo-state-change
-				     :position marker
-				     :from 'todo
-				     :to 'done))))))
+			      (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)))))))
 	    (if org-blocked-by-checkboxes (setq invis1 nil))
 	    (setq b (if invis1 (max (point-min) (1- (point))) (point))
 		  e (point-at-eol)

+ 3 - 0
lisp/org.el

@@ -8797,6 +8797,9 @@ For calling through lisp, arg is also interpreted in the following way:
 	(case-fold-search nil))
     (when (equal arg '(64))
       (setq arg nil org-blocker-hook nil))
+    (when (and org-blocker-hook
+	       (org-entry-get nil "NOBLOCKING"))
+      (setq org-blocker-hook nil))
     (save-excursion
       (catch 'exit
 	(org-back-to-heading)