aboutsummaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-03-25 13:55:56 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-03-25 13:55:56 +0100
commit327d4cce81f091d034b6ed216a7a67a824363247 (patch)
tree2103fd7377eb287233895fe8f8bb33bb5622fd28 /module
parentReplace one filter. (diff)
downloadcalp-327d4cce81f091d034b6ed216a7a67a824363247.tar.gz
calp-327d4cce81f091d034b6ed216a7a67a824363247.tar.xz
Fix events being dropped by sorting them.
Diffstat (limited to 'module')
-rwxr-xr-xmodule/main.scm5
-rw-r--r--module/util.scm2
2 files changed, 4 insertions, 3 deletions
diff --git a/module/main.scm b/module/main.scm
index 30fd4542..e29ae2c0 100755
--- a/module/main.scm
+++ b/module/main.scm
@@ -128,8 +128,9 @@
(define events (concatenate (map (cut children <> 'VEVENT) calendars)))
(let* ((repeating regular (partition repeating? events)))
- (sort*! repeating time<? (extract 'DTSTART))
- (sort*! regular time<? (extract 'DTSTART))
+
+ (set! repeating (sort*! repeating time<? (extract 'DTSTART)))
+ (set! regular (sort*! regular time<? (extract 'DTSTART)))
(let ((repeating (interleave-streams ev-time<?
(map generate-recurrence-set repeating))))
diff --git a/module/util.scm b/module/util.scm
index f60986ed..82c2ddc0 100644
--- a/module/util.scm
+++ b/module/util.scm
@@ -129,7 +129,7 @@
(comperator (get a)
(get b)))))
-;;; This function borrowed from web-ics (calendar util)
+;; Sorts the list @var{items}. @em{May} destroy the input list in the process
(define* (sort*! items comperator #:optional (get identity))
"A sort function more in line with how python's sorted works"
(sort! items (lambda (a b)