From 7a3532ed905430de245199149e15ec0f8db72fa9 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sun, 22 May 2022 23:40:52 -0400 Subject: [PATCH] FIX make datetimes that aren't on the current date not show their HHMM --- local/lib/org-x/org-x-dag.el | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/local/lib/org-x/org-x-dag.el b/local/lib/org-x/org-x-dag.el index 8dfefcc..680f778 100644 --- a/local/lib/org-x/org-x-dag.el +++ b/local/lib/org-x/org-x-dag.el @@ -3286,19 +3286,26 @@ FUTURE-LIMIT in a list." (if todayp datetimes (--drop-while (org-x-dag-date< it sel-date) datetimes))))) (expand-datetimes - (id donep which dt-fun) + (id donep which dt-fun post-fun) (-when-let (pts (-some->> (org-x-dag-id->planning-timestamp which id) (org-x-dag-partition-timestamp))) (-when-let (ds (get-datetimes donep dt-fun pts)) (-let ((tags (org-x-dag-id->tags id)) ((&plist :pos) pts)) - (--map (list :pos pos :datetime it :tags tags :id id) ds))))) + (->> (-map post-fun ds) + (--map (list :pos pos :datetime it :tags tags :id id))))))) (scheduled-datetimes (id donep) - (expand-datetimes id donep :scheduled #'org-x-dag-get-scheduled-at)) + (expand-datetimes id donep :scheduled + #'org-x-dag-get-scheduled-at + #'identity)) (deadlined-datetimes (id donep) - (expand-datetimes id donep :deadline #'org-x-dag-get-deadlines-at)) + (expand-datetimes id donep :deadline + #'org-x-dag-get-deadlines-at + (lambda (datetime) + (if (org-x-dag-date= datetime sel-date) datetime + (car (org-x-dag-datetime-split datetime)))))) (add-sched (acc id donep) (-let (((acc-d acc-s) acc)