From f2320a2cc1c3e27c851880a07e801b1d82bab3f4 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Sat, 21 Jan 2023 11:20:50 +0300 Subject: [PATCH] Revert "org-agenda.el: Fix `org-agenda-get-blocks'" This reverts commit cb19f5c94e3dc94da78169ec675d5bd07af34427. The original commit broke timestamp ranges with same starting and ending hours. Link: https://orgmode.org/list/87edrpa15m.fsf@gnu.org --- lisp/org-agenda.el | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 15736e5b8..d2aa8f3f2 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7147,19 +7147,13 @@ scheduled items with an hour specification like [h]h:mm." 'effort effort 'effort-minutes effort-minutes) level category tags - (save-match-data - (let ((hhmm1 (and (string-match org-ts-regexp1 s1) - (match-string 6 s1))) - (hhmm2 (and (string-match org-ts-regexp1 s2) - (match-string 6 s2)))) - (cond ((string= hhmm1 hhmm2) - (concat "<" start-time ">--<" end-time ">")) - ((and (= d1 d0) (= d2 d0)) - (concat "<" start-time ">--<" end-time ">")) - ((= d1 d0) - (concat "<" start-time ">")) - ((= d2 d0) - (concat "<" end-time ">"))))) + (cond + ((and (= d1 d0) (= d2 d0)) + (concat "<" start-time ">--<" end-time ">")) + ((= d1 d0) + (concat "<" start-time ">")) + ((= d2 d0) + (concat "<" end-time ">"))) remove-re)))) (org-add-props txt props 'face face