[Timeline] Barf if no clocklines can be found in given range

This commit is contained in:
Daniel - 2018-01-24 20:55:10 +01:00
parent d6e79dcf2d
commit d011ce0422
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 8 additions and 4 deletions

View File

@ -260,10 +260,14 @@ When called interactively, START and END are queried with
`org-read-date."
(interactive (list (org-read-date nil nil nil "Start time: ")
(org-read-date nil nil nil "End time: ")))
(let ((timeline (-reduce-from (lambda (tl f)
(funcall f tl))
(timeline-tools-timeline tstart tend files)
timeline-tools-filter-functions)))
(let* ((timeline (timeline-tools-timeline tstart tend files)))
(when (null timeline)
(user-error "No clocklines found in given range"))
(setq timeline
(-reduce-from (lambda (tl f)
(funcall f tl))
timeline
timeline-tools-filter-functions))
(let ((target-buffer (get-buffer-create " *Org Timeline*")))
(with-current-buffer target-buffer
(erase-buffer)