]> git.eshelyaron.com Git - emacs.git/commitdiff
(org-dblock-write:clocktable): Avoid infinite loop.
authorCarsten Dominik <dominik@science.uva.nl>
Fri, 8 Sep 2006 08:47:01 +0000 (08:47 +0000)
committerCarsten Dominik <dominik@science.uva.nl>
Fri, 8 Sep 2006 08:47:01 +0000 (08:47 +0000)
lisp/textmodes/org.el

index ecbcd86d043e64b78be20b85d117ed98c9332974..64fbb0542ffa2f77d24a7422a3e3d94f2695a225 100644 (file)
@@ -6204,15 +6204,15 @@ the returned times will be formatted strings."
     (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