summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2009-07-08 14:29:18 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2009-07-08 14:29:18 +0200
commit70879027889c025cb77264b983a1d8af41d0ed07 (patch)
treea4171ae5207dac81484e2dfc50c617939cbc0c03
parent60d0e73b00ff4bd4cc170b5ab56f95798e949622 (diff)
downloadorg-mode-70879027889c025cb77264b983a1d8af41d0ed07.tar.gz
Fix bug in org-narrow-to-subtree, which could lead to clock errors
Bernt Hansen writes: > I have a monthly repeated task (Archive tasks) that has lots of > old clock time on it currently but has never been marked DONE > since the creation of the property LAST_REPEAT_TIME. If this > task is clocking when Emacs exits and you restart emacs and > answer Yes to continue the clock - the modeline has the total > time for the parent task (151:04 instead of the total time for > this task (5:04). If I clock the task in again the modeline is > correct.
-rwxr-xr-xlisp/ChangeLog4
-rw-r--r--lisp/org-clock.el2
-rw-r--r--lisp/org.el2
3 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f26b2b5..351731d 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
2009-07-08 Carsten Dominik <carsten.dominik@gmail.com>
+ * org-clock.el (org-clock-goto): Find hidden headlines as well.
+
+ * org.el (org-narrow-to-subtree): Find hidden headlines as well.
+
* org-plot.el (org-plot/add-options-to-plist): Add timeind
option.
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 79dcb49..7863192 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -811,7 +811,7 @@ With prefix arg SELECT, offer recently clocked tasks for selection."
(if (or (< m (point-min)) (> m (point-max))) (widen))
(goto-char m)
(org-show-entry)
- (org-back-to-heading)
+ (org-back-to-heading t)
(org-cycle-hide-drawers 'children)
(recenter)
(if recent
diff --git a/lisp/org.el b/lisp/org.el
index 0f67838..feaa115 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6176,7 +6176,7 @@ If yes, remember the marker and the distance to BEG."
(save-excursion
(save-match-data
(narrow-to-region
- (progn (org-back-to-heading) (point))
+ (progn (org-back-to-heading t) (point))
(progn (org-end-of-subtree t) (point))))))
(defun org-clone-subtree-with-time-shift (n &optional shift)