From 0a68df7b49c2507203b511d837266ccabb582115 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Fri, 29 Mar 2019 18:46:18 +0100 Subject: [PATCH] =?UTF-8?q?[Timeline]=20Fix=20obsolete=20calls=20to=20?= =?UTF-8?q?=E2=80=98timeline-tools-entry-category=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site-lisp/timeline-tools.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/site-lisp/timeline-tools.el b/site-lisp/timeline-tools.el index 9c7a7b1..71b11c9 100644 --- a/site-lisp/timeline-tools.el +++ b/site-lisp/timeline-tools.el @@ -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)