[Timeline] Don’t stack ‘car’ and ‘cdr’ too much

For clarity and sanity.
This commit is contained in:
Daniel - 2018-01-24 21:09:26 +01:00
parent eebf3f0e35
commit 54a2edb223
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 6 additions and 6 deletions

View File

@ -212,8 +212,8 @@ Markers to org mode tasks are combined into a list."
(org-entry-get marker "CATEGORY"))) (org-entry-get marker "CATEGORY")))
timeline))) timeline)))
(mapcar (lambda (cluster) (mapcar (lambda (cluster)
(list (caar cluster) ; start of first entry (list (car (car cluster)) ; start of first entry
(cadar (last cluster)) ; end of last entry (cadr (car (last cluster))) ; end of last entry
(mapcar #'third cluster))) (mapcar #'third cluster)))
new-timeline))) new-timeline)))
@ -222,8 +222,8 @@ Markers to org mode tasks are combined into a list."
A slot is short if it is not longer than THRESHOLD seconds. A slot is short if it is not longer than THRESHOLD seconds.
Resulting gaps are distributed evenly among adjacent slots." Resulting gaps are distributed evenly among adjacent slots."
(let ((start (caar timeline)) (let ((start (car (car timeline)))
(end (cadar (last timeline))) (end (cadr (car (last timeline))))
new-timeline) new-timeline)
;; remove all slots that are too short ;; remove all slots that are too short
(setq new-timeline (setq new-timeline
@ -233,8 +233,8 @@ Resulting gaps are distributed evenly among adjacent slots."
timeline)) timeline))
;; reset start and end times ;; reset start and end times
(setf (caar new-timeline) start) (setf (car (car new-timeline)) start)
(setf (cadar (last new-timeline)) end) (setf (cadr (car (last new-timeline))) end)
;; distribute gaps evenly among adjacent slots ;; distribute gaps evenly among adjacent slots
(cl-do (cl-do