diff options
author | Bastien Guerry <bzg@gnu.org> | 2014-04-22 16:07:45 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@gnu.org> | 2014-04-22 16:07:45 +0200 |
commit | 30cb51f1bc9ce5976f492b5df5d30c6298f5a2aa (patch) | |
tree | 782f2f5767065ad571bf5b82a162da96064cf22a /lisp/org/org-clock.el | |
parent | d5ff4ded7a225306017006fc96b0a30180ae6f6b (diff) | |
download | emacs-30cb51f1bc9ce5976f492b5df5d30c6298f5a2aa.tar.gz |
Merge Org 8.2.6-1.
The last merge was from 8.2.5c, but many important bugs got
fixed between 8.2.5c and 8.2.6-1.
Diffstat (limited to 'lisp/org/org-clock.el')
-rw-r--r-- | lisp/org/org-clock.el | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index fa50f9dda95..f2a37484cc0 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -1838,9 +1838,9 @@ Use \\[org-clock-remove-overlays] to remove the subtree times." (when org-remove-highlights-with-change (org-add-hook 'before-change-functions 'org-clock-remove-overlays nil 'local)))) - (message (concat "Total file time: " - (org-minutes-to-clocksum-string org-clock-file-total-minutes) - " (%d hours and %d minutes)") h m))) + (message (concat "Total file time: " + (org-minutes-to-clocksum-string org-clock-file-total-minutes) + " (%d hours and %d minutes)") h m))) (defvar org-clock-overlays nil) (make-variable-buffer-local 'org-clock-overlays) @@ -1850,16 +1850,17 @@ 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)) - (off 0) + (let* ((l (if level (org-get-valid-level level 0) 0)) ov tx) - (org-move-to-column c) - (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)) - (make-string (+ off (max 0 (- c (current-column)))) ?.) + (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) (make-string (- 16 l) ?\ )) @@ -2705,9 +2706,13 @@ TIME: The sum of all time spend in this tree, in minutes. This time (format "file:%s::%s" (buffer-file-name) (save-match-data - (org-make-org-heading-search-string - (match-string 2)))) - (match-string 2))) + (match-string 2))) + (org-make-org-heading-search-string + (replace-regexp-in-string + org-bracket-link-regexp + (lambda (m) (or (match-string 3 m) + (match-string 1 m))) + (match-string 2))))) tsp (when timestamp (setq props (org-entry-properties (point))) (or (cdr (assoc "SCHEDULED" props)) |