summaryrefslogtreecommitdiff
path: root/app-emacs/calfw/files/calfw-1.6-time-ranges.patch
diff options
context:
space:
mode:
Diffstat (limited to 'app-emacs/calfw/files/calfw-1.6-time-ranges.patch')
-rw-r--r--app-emacs/calfw/files/calfw-1.6-time-ranges.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/app-emacs/calfw/files/calfw-1.6-time-ranges.patch b/app-emacs/calfw/files/calfw-1.6-time-ranges.patch
new file mode 100644
index 000000000000..582b8f443b45
--- /dev/null
+++ b/app-emacs/calfw/files/calfw-1.6-time-ranges.patch
@@ -0,0 +1,39 @@
+From fc4306c44b681b6e8f956ebc2740002bdb66d266 Mon Sep 17 00:00:00 2001
+From: Maxime Wack <MaximeWack@users.noreply.github.com>
+Date: Wed, 3 Feb 2021 12:51:20 +0100
+Subject: [PATCH 1/3] Fix cfw:org-get-timerange to display the correct
+ timerange
+
+From 407b0eb31b1d16532e22316edfba5b0b76f4cd3b Mon Sep 17 00:00:00 2001
+From: Maxime Wack <maximewack@free.Fr>
+Date: Mon, 7 Jun 2021 00:58:43 +0200
+Subject: [PATCH 2/3] Re-use start-date, as permitted by let*
+
+From 6c75fd3acb47f634d0b2c3c591e659c5bae448cc Mon Sep 17 00:00:00 2001
+From: Maxime Wack <maximewack@free.Fr>
+Date: Mon, 7 Jun 2021 00:59:35 +0200
+Subject: [PATCH 3/3] Fix the double displaying of timeranges with times
+
+--- a/calfw-org.el
++++ b/calfw-org.el
+@@ -238,14 +238,13 @@
+ (match-string 1 extra)))
+ (total-days (string-to-number
+ (match-string 2 extra)))
+- (start-date (time-subtract
+- (org-read-date nil t date-string)
+- (seconds-to-time (* 3600 24 (- cur-day 1)))))
++ (start-date (org-read-date nil t date-string))
+ (end-date (time-add
+- (org-read-date nil t date-string)
+- (seconds-to-time (* 3600 24 (- total-days cur-day))))))
+- (list (calendar-gregorian-from-absolute (time-to-days start-date))
+- (calendar-gregorian-from-absolute (time-to-days end-date)) text))
++ start-date
++ (seconds-to-time (* 3600 24 (- total-days 1))))))
++ (unless (= cur-day total-days)
++ (list (calendar-gregorian-from-absolute (time-to-days start-date))
++ (calendar-gregorian-from-absolute (time-to-days end-date)) text)))
+ )))))
+
+ (defun cfw:org-schedule-period-to-calendar (begin end)