From 70879027889c025cb77264b983a1d8af41d0ed07 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 8 Jul 2009 14:29:18 +0200 Subject: [PATCH] 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. --- lisp/ChangeLog | 4 ++++ lisp/org-clock.el | 2 +- lisp/org.el | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f26b2b554..351731d89 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2009-07-08 Carsten Dominik + * 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 79dcb49a7..78631922b 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 0f67838f7..feaa11553 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) -- 2.11.4.GIT