 `org-read-date’."
   (interactive (list (org-read-date nil nil nil "Start time: ")
                      (org-read-date nil nil nil "End time: ")))
-  (let ((timeline (->> (timeline-tools-timeline tstart tend files)
-                       ;; XXX: make these modifiers customizable
-                       timeline-tools-cluster-same-category
-                       (timeline-tools-skip-short-entries
-                        timeline-tools-short-task-threshold)
-                       timeline-tools-cluster-same-category)))
+  (let ((timeline (-reduce-from (lambda (tl f)
+                                  (funcall f tl))
+                                (timeline-tools-timeline tstart tend files)
+                                timeline-tools-filter-functions)))
     (let ((target-buffer (get-buffer-create " *Org Timeline*")))
       (with-current-buffer target-buffer
         (erase-buffer)

                    (mapcar #'third cluster)))
            new-timeline)))

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

A slot is short if it is not longer than THRESHOLD seconds.

  "Duration of task to be considered as short."
  :group 'timeline-tools
  :type 'integer)

(defcustom timeline-tools-filter-functions
  '(timeline-tools-skip-short-entries
    timeline-tools-cluster-same-category)
  "List of functions to apply when formatting timelines.
Filter are applied in the order they are given in this list."
  :group 'timeline-tools
  :type '(list function))


