[Timeline] Beautify test on including the current clockline

This commit is contained in:
Daniel - 2018-01-24 21:05:11 +01:00
parent d011ce0422
commit eebf3f0e35
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 9 additions and 9 deletions

View File

@ -163,15 +163,15 @@ given bounds."
;; add currently running clock if wanted ;; add currently running clock if wanted
(when (and org-clock-report-include-clocking-task (when (and org-clock-report-include-clocking-task
(eq (org-clocking-buffer) (current-buffer)) (eq (org-clocking-buffer) (current-buffer))
(eq (marker-position org-clock-hd-marker) (point)) (eq (marker-position org-clock-hd-marker) (point)))
;; fixme: make this test look nicer (let ((current-clock-start (float-time org-clock-start-time))
(or (<= tstart (float-time org-clock-start-time) tend) (current-clock-end (float-time)))
(<= tstart (float-time) tend) (when (or (<= tstart current-clock-start tend)
(<= (float-time org-clock-start-time) (<= tstart current-clock-end tend)
tstart tend (<= current-clock-start
(float-time)))) tstart tend
(push (cons (float-time org-clock-start-time) (float-time)) current-clock-end))
times)) (push (cons current-clock-start current-clock-end) times))))
;; store away clocklines of current headline ;; store away clocklines of current headline
(when (not (null times)) (when (not (null times))
(push (cons (point-marker) times) task-clock-times) (push (cons (point-marker) times) task-clock-times)