[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/excorporate d01881c8c4: Shorten same-day time ranges
From: |
Thomas Fitzsimmons |
Subject: |
[elpa] externals/excorporate d01881c8c4: Shorten same-day time ranges |
Date: |
Mon, 19 Feb 2024 08:53:34 -0500 (EST) |
branch: externals/excorporate
commit d01881c8c420a308e388ab394e5d45ba894907ef
Author: Benjamin Leis <benleis1@gmail.com>
Commit: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Shorten same-day time ranges
* excorporate-org.el (exco-org-insert-meeting-headline): Show a
time period for meetings whose start and end times occur on the
same day. (Bug#68653)
Co-authored-by: Thomas Fitzsimmons <fitzsim@fitzsim.org>
---
excorporate-org.el | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/excorporate-org.el b/excorporate-org.el
index 74dbe9d111..f6bdc10fe3 100644
--- a/excorporate-org.el
+++ b/excorporate-org.el
@@ -251,11 +251,19 @@ identifier."
"TODO"
"DONE")))
(insert (format "** %s %s\n" keyword subject))
- (org-schedule nil (format-time-string "<%Y-%m-%d %a %H:%M>"
- start-time))
- (forward-line -1)
- (end-of-line)
- (insert "--" (format-time-string "<%Y-%m-%d %a %H:%M>" end-time))
+ ;; If the meeting times are on the same day use a time period
+ ;; otherwise use a range of days.
+ (if (= (time-to-day-in-year start-time) (time-to-day-in-year end-time))
+ (org-schedule
+ nil (format "<%s-%s>"
+ (format-time-string "%Y-%m-%d %a %H:%M" start-time)
+ (format-time-string "%H:%M" end-time)))
+ (progn
+ (org-schedule nil (format-time-string "<%Y-%m-%d %a %H:%M>"
+ start-time))
+ (forward-line -1)
+ (end-of-line)
+ (insert "--" (format-time-string "<%Y-%m-%d %a %H:%M>" end-time))))
(forward-line)
(org-set-property "Identifier" (format "%S" item-identifier))
(org-insert-time-stamp (current-time) t t "+ Retrieved " "\n")))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/excorporate d01881c8c4: Shorten same-day time ranges,
Thomas Fitzsimmons <=