From 53e81f252e1c8d6d712b8e348f30afbadad3e98d Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sun, 3 Dec 2017 09:47:36 +0100 Subject: [PATCH] [Org] Another attempt to fix condition on current clock --- site-lisp/db-org.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index a8efd4c..5ff45c3 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -980,7 +980,8 @@ heading and CLOCK-TIMES consists of cons cells of the form (START a clock line for this task. START and END are times as returned by FLOAT-TIME, which see. No truncation with respect to TSTART and TEND is done, i.e., START or END may lie outside of these -limits, but it is always true that TSTART ≤ END or START ≤ TEND." +limits, but it is always true that TSTART ≤ END ≤ TEND or +TSTART ≤ START ≤ TEND." ;; adapted from `org-clock-sum’ (when (eq major-mode 'org-mode) (let* ((re (concat "^\\(\\*+\\)[ \t]\\|^[ \t]*" @@ -1021,9 +1022,9 @@ limits, but it is always true that TSTART ≤ END or START ≤ TEND." (eq (org-clocking-buffer) (current-buffer)) (eq (marker-position org-clock-hd-marker) (point)) (or (and tstart - (<= tstart (float-time org-clock-start-time))) + (<= tstart (float-time org-clock-start-time) tend)) (and tend - (<= (float-time) tend)))) + (<= tstart (float-time) tend)))) (push (cons (float-time org-clock-start-time) (float-time)) times)) (when (not (null times))