summaryrefslogtreecommitdiff
path: root/contrib/lisp/org-depend.el
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/lisp/org-depend.el')
-rw-r--r--contrib/lisp/org-depend.el24
1 files changed, 12 insertions, 12 deletions
diff --git a/contrib/lisp/org-depend.el b/contrib/lisp/org-depend.el
index d741dbe..dc99a1d 100644
--- a/contrib/lisp/org-depend.el
+++ b/contrib/lisp/org-depend.el
@@ -1,5 +1,5 @@
;;; org-depend.el --- TODO dependencies for Org-mode
-;; Copyright (C) 2008-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2013 Free Software Foundation, Inc.
;;
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
@@ -13,15 +13,13 @@
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
-;; GNU Emacs is distributed in the hope that it will be useful,
+;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Commentary:
@@ -205,13 +203,15 @@ This does two different kinds of triggers:
property is seen as an entry id. Org-mode finds the entry with the
corresponding ID property and switches it to the state TODO as well."
+ ;; Refresh the effort text properties
+ (org-refresh-properties org-effort-property 'org-effort)
;; Get information from the plist
(let* ((type (plist-get change-plist :type))
(pos (plist-get change-plist :position))
(from (plist-get change-plist :from))
(to (plist-get change-plist :to))
(org-log-done nil) ; IMPROTANT!: no logging during automatic trigger!
- trigger triggers tr p1 kwd)
+ trigger triggers tr p1 kwd id)
(catch 'return
(unless (eq type 'todo-state-change)
;; We are only handling todo-state-change....
@@ -268,7 +268,7 @@ This does two different kinds of triggers:
(tags (match-string 5))
(priority (org-get-priority (or (match-string 3) "")))
(effort (when (or effort-up effort-down)
- (let ((effort (org-get-effort)))
+ (let ((effort (get-text-property (point) 'org-effort)))
(when effort
(org-duration-string-to-minutes effort))))))
(push (list (point) todo-kwd priority tags effort)
@@ -311,15 +311,15 @@ This does two different kinds of triggers:
(cond (priority-up
(or p1-gt
(and (equal p1 p2)
- (or (and effort-up e1-gt)
- (and effort-down e1-lt)))))
+ (or (and effort-up e1-lt)
+ (and effort-down e2-gt)))))
(priority-down
(or p1-lt
(and (equal p1 p2)
- (or (and effort-up e1-gt)
- (and effort-down e1-lt)))))
+ (or (and effort-up e1-lt)
+ (and effort-down e2-gt)))))
(effort-up
- (or e1-gt (and (equal e1 e2) p1-gt)))
+ (or e2-gt (and (equal e1 e2) p1-gt)))
(effort-down
(or e1-lt (and (equal e1 e2) p1-gt))))))))
(when items