[Timeline] Fix obsolete calls to ‘timeline-tools-entry-category’

This commit is contained in:
Daniel Borchmann 2019-03-29 18:46:18 +01:00
parent 207fb331ff
commit 0a68df7b49
Signed by: exot
GPG Key ID: 4F63DB96D45AA9C6

View File

@ -475,17 +475,18 @@ archives."
timeline-tools--current-time-end)))
(insert "|--|\n")
(insert "| Category | Start | End | Duration | Task |\n")
(let ((last-category nil))
(let ((last-category nil)
(current-category nil))
(dolist (line timeline)
(when (not (equal last-category
(funcall timeline-tools-category-function
line
timeline-tools--current-time-start
timeline-tools--current-time-end)))
(setq current-category (funcall timeline-tools-category-function
line
timeline-tools--current-time-start
timeline-tools--current-time-end))
(when (not (equal last-category current-category))
(insert "|--|\n")
(setq last-category (timeline-tools-entry-category line)))
(setq last-category current-category))
(insert (format "| %s | %s | %s | %s min | %s | \n"
(timeline-tools-entry-category line)
current-category
(timeline-tools-format-entry-time line 'start)
(timeline-tools-format-entry-time line 'end)
(timeline-tools-entry-duration line)