From bcbc97d902b9fe01fa5126313ae08b16ba2421b8 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Fri, 18 Apr 2014 16:35:27 +0200 Subject: [PATCH] Fix `org-clock-put-overlay' --- lisp/org-clock.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 2e51fe839..dcea0ca7f 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -1850,16 +1850,15 @@ Use \\[org-clock-remove-overlays] to remove the subtree times." If LEVEL is given, prefix time with a corresponding number of stars. This creates a new overlay and stores it in `org-clock-overlays', so that it will be easy to remove." - (let* ((c 60) (h (floor (/ time 60))) (m (- time (* 60 h))) - (l (if level (org-get-valid-level level 0) 0)) + (let* ((l (if level (org-get-valid-level level 0) 0)) ov tx) - (org-move-to-column c) + (org-move-to-column 60) (unless (eolp) (skip-chars-backward "^ \t")) (skip-chars-backward " \t") - (setq ov (make-overlay (1- (point-at-eol)) (point-at-eol)) - tx (concat (buffer-substring (1- (point)) (point)) + (setq ov (make-overlay (point-at-bol) (point-at-eol)) + tx (concat (buffer-substring (point-at-bol) (point)) (make-string - (max 0 (- (- c (current-column)) + (max 0 (- (- 60 (current-column)) (length (org-get-at-bol 'line-prefix)))) ?.) (org-add-props (concat (make-string l ?*) " " (org-minutes-to-clocksum-string time)