update packages
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
;;; org-depend.el --- TODO dependencies for Org-mode
|
||||
;;; org-depend.el --- TODO dependencies for Org-mode -*- lexical-binding: t; -*-
|
||||
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
|
||||
;;
|
||||
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
|
||||
@@ -156,7 +156,7 @@
|
||||
|
||||
(require 'org)
|
||||
(eval-when-compile
|
||||
(require 'cl))
|
||||
(require 'cl-lib))
|
||||
|
||||
(defcustom org-depend-tag-blocked t
|
||||
"Whether to indicate blocked TODO items by a special tag."
|
||||
@@ -224,8 +224,8 @@ This does two different kinds of triggers:
|
||||
;; OK, we just switched from a TODO state to a DONE state
|
||||
;; Lets see if this entry has a TRIGGER property.
|
||||
;; If yes, split it up on whitespace.
|
||||
(setq trigger (org-entry-get pos "TRIGGER")
|
||||
triggers (and trigger (split-string trigger)))
|
||||
(setq trigger (org-entry-get pos "TRIGGER" t)
|
||||
triggers (and trigger (split-string trigger)))
|
||||
|
||||
;; Go through all the triggers
|
||||
(while (setq tr (pop triggers))
|
||||
@@ -256,9 +256,7 @@ This does two different kinds of triggers:
|
||||
(let ((this-item (point)))
|
||||
;; go up to the parent headline, then advance to next child
|
||||
(org-up-heading-safe)
|
||||
(let ((end (save-excursion (org-end-of-subtree t)
|
||||
(point)))
|
||||
(done nil)
|
||||
(let ((done nil)
|
||||
(items '()))
|
||||
(outline-next-heading)
|
||||
(while (not done)
|
||||
@@ -289,21 +287,21 @@ This does two different kinds of triggers:
|
||||
(t (nreverse items))))
|
||||
(setq items (cl-remove-if
|
||||
(lambda (item)
|
||||
(or (equal (first item) this-item)
|
||||
(or (equal (cl-first item) this-item)
|
||||
(and (not todo-and-done-only)
|
||||
(member (second item) org-done-keywords))
|
||||
(member (cl-second item) org-done-keywords))
|
||||
(and (or todo-only
|
||||
todo-and-done-only)
|
||||
(null (second item)))))
|
||||
(null (cl-second item)))))
|
||||
items))
|
||||
(setq items
|
||||
(sort
|
||||
items
|
||||
(lambda (item1 item2)
|
||||
(let* ((p1 (third item1))
|
||||
(p2 (third item2))
|
||||
(e1 (fifth item1))
|
||||
(e2 (fifth item2))
|
||||
(let* ((p1 (cl-third item1))
|
||||
(p2 (cl-third item2))
|
||||
(e1 (cl-fifth item1))
|
||||
(e2 (cl-fifth item2))
|
||||
(p1-lt (< p1 p2))
|
||||
(p1-gt (> p1 p2))
|
||||
(e1-lt (and e1 (or (not e2) (< e1 e2))))
|
||||
@@ -323,7 +321,7 @@ This does two different kinds of triggers:
|
||||
(effort-down
|
||||
(or e1-lt (and (equal e1 e2) p1-gt))))))))
|
||||
(when items
|
||||
(goto-char (first (first items)))
|
||||
(goto-char (cl-first (cl-first items)))
|
||||
(org-entry-add-to-multivalued-property nil "TRIGGER" tr)
|
||||
(org-todo kwd)))))))
|
||||
((string-match "\\`chain-siblings(\\(.*?\\))\\'" tr)
|
||||
@@ -394,7 +392,7 @@ this ID property, that entry is also checked."
|
||||
(save-excursion
|
||||
(goto-char pos)
|
||||
;; find the older sibling, exit if no more siblings
|
||||
(unless (org-get-last-sibling)
|
||||
(unless (org-get-previous-sibling)
|
||||
(throw 'ignore t))
|
||||
;; Check if this entry is not yet done and block
|
||||
(unless (org-entry-is-done-p)
|
||||
|
||||
Reference in New Issue
Block a user