Mercurial > emacs
comparison lisp/textmodes/org.el @ 72709:f40288cce20c
(org-dblock-write:clocktable): Avoid infinite loop.
author | Carsten Dominik <dominik@science.uva.nl> |
---|---|
date | Fri, 08 Sep 2006 08:47:01 +0000 |
parents | 37bdcb1f6e30 |
children | 9a63ebe75d2b a1a25ac6c88a |
comparison
equal
deleted
inserted
replaced
72708:7b81169db15a | 72709:f40288cce20c |
---|---|
6202 "|\n") | 6202 "|\n") |
6203 (goto-char (point-min)) | 6203 (goto-char (point-min)) |
6204 (while (setq p (next-single-property-change (point) :org-clock-minutes)) | 6204 (while (setq p (next-single-property-change (point) :org-clock-minutes)) |
6205 (goto-char p) | 6205 (goto-char p) |
6206 (when (setq time (get-text-property p :org-clock-minutes)) | 6206 (when (setq time (get-text-property p :org-clock-minutes)) |
6207 (beginning-of-line 1) | 6207 (save-excursion |
6208 (when (and (looking-at "\\(\\*+\\)[ \t]+\\(.*?\\)\\([ \t]+:[0-9a-zA-Z_@:]+:\\)?[ \t]*$") | 6208 (beginning-of-line 1) |
6209 (setq level (- (match-end 1) (match-beginning 1))) | 6209 (when (and (looking-at "\\(\\*+\\)[ \t]+\\(.*?\\)\\([ \t]+:[0-9a-zA-Z_@:]+:\\)?[ \t]*$") |
6210 (<= level maxlevel)) | 6210 (setq level (- (match-end 1) (match-beginning 1))) |
6211 (setq hlc (if emph (or (cdr (assoc level hlchars)) "") "") | 6211 (<= level maxlevel)) |
6212 hdl (match-string 2) | 6212 (setq hlc (if emph (or (cdr (assoc level hlchars)) "") "") |
6213 h (/ time 60) | 6213 hdl (match-string 2) |
6214 m (- time (* 60 h))) | 6214 h (/ time 60) |
6215 (save-excursion | 6215 m (- time (* 60 h))) |
6216 (goto-char ins) | 6216 (goto-char ins) |
6217 (if (= level 1) (insert-before-markers "|-\n")) | 6217 (if (= level 1) (insert-before-markers "|-\n")) |
6218 (insert-before-markers | 6218 (insert-before-markers |
6219 "| " (int-to-string level) "|" hlc hdl hlc " |" | 6219 "| " (int-to-string level) "|" hlc hdl hlc " |" |
6220 (make-string (1- level) ?|) | 6220 (make-string (1- level) ?|) |