# HG changeset patch # User Carsten Dominik # Date 1157705221 0 # Node ID f40288cce20c9c8c2701de333c8ca7b437f91df6 # Parent 7b81169db15ab529320b227b23ee78dd63f6f0ee (org-dblock-write:clocktable): Avoid infinite loop. diff -r 7b81169db15a -r f40288cce20c lisp/textmodes/org.el --- a/lisp/textmodes/org.el Fri Sep 08 08:46:37 2006 +0000 +++ b/lisp/textmodes/org.el Fri Sep 08 08:47:01 2006 +0000 @@ -6204,15 +6204,15 @@ (while (setq p (next-single-property-change (point) :org-clock-minutes)) (goto-char p) (when (setq time (get-text-property p :org-clock-minutes)) - (beginning-of-line 1) - (when (and (looking-at "\\(\\*+\\)[ \t]+\\(.*?\\)\\([ \t]+:[0-9a-zA-Z_@:]+:\\)?[ \t]*$") - (setq level (- (match-end 1) (match-beginning 1))) - (<= level maxlevel)) - (setq hlc (if emph (or (cdr (assoc level hlchars)) "") "") - hdl (match-string 2) - h (/ time 60) - m (- time (* 60 h))) - (save-excursion + (save-excursion + (beginning-of-line 1) + (when (and (looking-at "\\(\\*+\\)[ \t]+\\(.*?\\)\\([ \t]+:[0-9a-zA-Z_@:]+:\\)?[ \t]*$") + (setq level (- (match-end 1) (match-beginning 1))) + (<= level maxlevel)) + (setq hlc (if emph (or (cdr (assoc level hlchars)) "") "") + hdl (match-string 2) + h (/ time 60) + m (- time (* 60 h))) (goto-char ins) (if (= level 1) (insert-before-markers "|-\n")) (insert-before-markers