org-clock.el (org-clock-in): Fix bug when fetching the effort value
authorBastien Guerry <bzg@altern.org>
Wed, 23 Jan 2013 13:48:52 +0000 (14:48 +0100)
committerBastien Guerry <bzg@altern.org>
Wed, 23 Jan 2013 13:48:52 +0000 (14:48 +0100)
* org-clock.el (org-clock-in): Fix bug when fetching the effort
value.

Thanks to Vasil S. Diadov for reporting this bug and proposing a patch.

lisp/org-clock.el

index c043dd1..7bd5b5a 100644 (file)
@@ -1204,7 +1204,7 @@ make this the default behavior.)"
              (setq org-clock-start-time
                    (apply 'encode-time
                           (org-parse-time-string (match-string 1))))
-             (setq org-clock-effort (get-text-property (point) 'org-effort))
+             (setq org-clock-effort (org-entry-get (point) org-effort-property))
              (setq org-clock-total-time (org-clock-sum-current-item
                                          (org-clock-get-sum-start))))
             ((eq org-clock-in-resume 'auto-restart)
@@ -1224,7 +1224,7 @@ make this the default behavior.)"
                (beginning-of-line 1)
                (org-indent-line-to (- (org-get-indentation) 2)))
              (insert org-clock-string " ")
-             (setq org-clock-effort (get-text-property (point) 'org-effort))
+             (setq org-clock-effort (org-entry-get (point) org-effort-property))
              (setq org-clock-total-time (org-clock-sum-current-item
                                          (org-clock-get-sum-start)))
              (setq org-clock-start-time