Clocking: Fix bug in the new cocking code

The cursor could move while collecting the total time for the current
subtree.
This commit is contained in:
Carsten Dominik 2009-05-28 19:49:11 +02:00
parent 9efd83addd
commit 5ce1c5708f
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,8 @@
2009-05-28 Carsten Dominik <carsten.dominik@gmail.com>
* org-clock.el (org-clock-sum-current-item): Fix positioning bug
when retrieving total clocked time in the subtree.
* org.el (org-quoting-blocks): New variable.
2009-05-27 Carsten Dominik <carsten.dominik@gmail.com>

View File

@ -289,10 +289,11 @@ pointing to it."
(defun org-clock-sum-current-item ()
"Returns time, clocked on current item in total"
(save-restriction
(org-narrow-to-subtree)
(org-clock-sum)
org-clock-file-total-minutes))
(save-excursion
(save-restriction
(org-narrow-to-subtree)
(org-clock-sum)
org-clock-file-total-minutes)))
(defun org-clock-get-clock-string ()
"Form a clock-string, that will be show in the mode line.