 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."))
+    (user-error "Marker not valid"))
   (let ((clock-lines nil))
     (save-mark-and-excursion
      (org-with-point-at marker




;;; Reporting

;; All of what follows should be available in org-mode somewhere, but doing it
;; myself was faster and also more fun :)

(defgroup timeline-reporting nil
  "Functionality for formatting timelines."
  :tag "Timeline Formatter"
  :group 'applications)

(require 'dash)

(defun db/org-map-clock-lines-and-entries (clockline-fn headline-fn)
  "Iterate point over all clocklines and headlines of the current buffer.
For each clockline, call CLOCKLINE-FN with the starting and
ending time as arguments and point on the beginning of the line.
For each headline, call HEADLINE-FN with no arguments and point

            new-timeline)))

(defun db/org-skip-short-entries-in-timeline (threshold timeline)
  "Skip entries shorter than THRESHOLD in TIMELINE.

A slot is short if it is not longer than THRESHOLD seconds.
Resulting gaps are distributed evenly among adjacent slots."
  (let ((start (first (first timeline)))
