From 382eedaab42785113619941596902a8deb648343 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sun, 23 Nov 2008 07:30:18 +0100 Subject: [PATCH] Make sure the clocktable sees the first line of the buffer. Org-mode still has a few operations that do not work well when the first line of a buffer is a headline. One was constructing the clock table, but this one is eliminated by this patch. --- lisp/ChangeLog | 5 +++++ lisp/org-clock.el | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 212ce4079..04d8a1508 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-11-23 Carsten Dominik + + * org-clock.el (org-dblock-write:clocktable): Make sure the + clocktable sees the first line. + 2008-11-22 Carsten Dominik * org.el (org-open-at-point): Fix mixup about interactive and diff --git a/lisp/org-clock.el b/lisp/org-clock.el index afcba8d34..d717d048b 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -830,7 +830,7 @@ the currently selected interval size." (block (plist-get params :block)) (link (plist-get params :link)) ipos time p level hlc hdl content recalc formula pcol - cc beg end pos tbl tbl1 range-text rm-file-column scope-is-list) + cc beg end pos tbl tbl1 range-text rm-file-column scope-is-list st) (setq org-clock-file-total-minutes nil) (when step (unless (or block (and ts te)) @@ -912,7 +912,11 @@ the currently selected interval size." (unless scope-is-list (org-clock-sum ts te) (goto-char (point-min)) - (while (setq p (next-single-property-change (point) :org-clock-minutes)) + (setq st t) + (while (or (and (bobp) (prog1 st (setq st nil)) + (get-text-property (point) :org-clock-minutes) + (setq p (point-min))) + (setq p (next-single-property-change (point) :org-clock-minutes))) (goto-char p) (when (setq time (get-text-property p :org-clock-minutes)) (save-excursion -- 2.11.4.GIT