From d2a91b8320a4c5637e5f0e899d07f5ff339c65b4 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Wed, 21 Nov 2018 17:19:32 +0100 Subject: [PATCH] =?UTF-8?q?[Timeline]=20Extend=20=E2=80=98timeline-tools-c?= =?UTF-8?q?locklines-of-task=E2=80=99=20to=20accept=20point=20or=20mark?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site-lisp/timeline-tools.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/site-lisp/timeline-tools.el b/site-lisp/timeline-tools.el index b6a8fd6..84f85c5 100644 --- a/site-lisp/timeline-tools.el +++ b/site-lisp/timeline-tools.el @@ -167,20 +167,18 @@ TIME-1 and TIME-2 must be given in a format understandable by time-2)) (org-clock-update-time-maybe))) -(defun timeline-tools-clocklines-of-task (marker) - "Return list of all clock lines of task under MARKER. +(defun timeline-tools-clocklines-of-task (pom) + "Return list of all clock lines of task under POM. Each clock line is represented as a cons cell (START . END), where both START and END are the starting and ending times of the corresponding clock lines, encoded as a float denoting the seconds since the epoch. Includes clock lines of all subtrees as well. The order of the entries in the resulting list will be -reversed of what it is in the subtree of MARKER." - (when (not (markerp marker)) - (user-error "Marker not valid")) +reversed of what it is in the subtree of POM." (let ((clock-lines nil)) (save-mark-and-excursion - (org-with-point-at marker + (org-with-point-at pom (org-narrow-to-subtree) (timeline-tools-map-clocklines (lambda (start end)