Fix `org-clock-put-overlay' again.

This commit is contained in:
Bastien Guerry 2014-04-18 21:30:12 +02:00
parent bcbc97d902
commit 7c5cf02e2f
1 changed files with 6 additions and 5 deletions

View File

@ -1852,13 +1852,14 @@ This creates a new overlay and stores it in `org-clock-overlays', so that it
will be easy to remove."
(let* ((l (if level (org-get-valid-level level 0) 0))
ov tx)
(org-move-to-column 60)
(unless (eolp) (skip-chars-backward "^ \t"))
(skip-chars-backward " \t")
(setq ov (make-overlay (point-at-bol) (point-at-eol))
tx (concat (buffer-substring (point-at-bol) (point))
(beginning-of-line)
(when (looking-at org-complex-heading-regexp)
(goto-char (match-beginning 4)))
(setq ov (make-overlay (point) (point-at-eol))
tx (concat (buffer-substring-no-properties (point) (match-end 4))
(make-string
(max 0 (- (- 60 (current-column))
(- (match-end 4) (match-beginning 4))
(length (org-get-at-bol 'line-prefix)))) ?.)
(org-add-props (concat (make-string l ?*) " "
(org-minutes-to-clocksum-string time)