diff options
author | Bastien Guerry <bzg@altern.org> | 2014-04-18 21:30:12 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2014-04-18 21:30:12 +0200 |
commit | 7c5cf02e2f88ccd5f90756a0cc25dc30c159fd6a (patch) | |
tree | 1bfb62268bb08ab95c2b756c285ea4760e2ca298 | |
parent | bcbc97d902b9fe01fa5126313ae08b16ba2421b8 (diff) | |
download | org-mode-7c5cf02e2f88ccd5f90756a0cc25dc30c159fd6a.tar.gz |
Fix `org-clock-put-overlay' again.
-rw-r--r-- | lisp/org-clock.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el index dcea0ca..f2a3748 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -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) |