                                                              (find-file-noselect file))
                                       (db/org-clocking-time-in-range tstart tend))))
         timeline)
-    (cl-dolist (headline task-clock-times)
-      (cl-dolist (clock-time (cdr headline))
+    (dolist (headline task-clock-times)
+      (dolist (clock-time (cdr headline))
         (push (list (car clock-time) (cdr clock-time) (car headline))
               timeline)))
     (setq timeline

clocking times attached, provied they lie between TSTART and
TEND.  The resulting list conists of elements of the form

  (HEADLINE . CLOCK-TIMES)

where HEADLINE is the headline of the corresponding task and
CLOCK-TIMES consists of cons cells of the form (START . END),
where START and END are the starting and ending times of 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, provided that TSTART ≤ END or START ≤ TEND."
  ;; adapted from `org-clock-sum’
  (when (eq major-mode 'org-mode)

        (insert "|--|\n")
        (insert "| Start | End | Duration | Task |\n")
        (insert "|--|\n")
        (dolist (entry timeline)
          (cl-destructuring-bind (start end marker) entry
           (insert (format "| %s | %s | %s min | %s |\n"
                           (format-time-string "%Y-%m-%d %H:%m" start)
                           (format-time-string "%Y-%m-%d %H:%m" end)
                           (floor (/ (- end start) 60))
                           (save-match-data
                            (let* ((heading (save-mark-and-excursion
                                             (with-current-buffer (marker-buffer marker)
                                               (goto-char (marker-position marker))
                                               (thing-at-point 'line t)))))
                              (string-match (format "^\\(\\*+\\)\\(?: +%s\\)?\\(?: %s\\)? +\\(.*?\\)[ \t]*\\(?::\\(?:[A-Za-z]+:\\)+\\)?$"
                                                    (regexp-opt org-todo-keywords-1)
                                                    org-priority-regexp)
                                            heading)
                              (match-string 4 heading)))))))
        (insert "|--|\n")
        (goto-char (point-min))
        (org-table-align))
