From 7cc208af91fc948b9e7739acecafcf179cad56a0 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Fri, 18 Aug 2023 15:19:25 +0300 Subject: [PATCH] org-agenda: Do not err on SCHEDULED/DEADLINE with inactive timestamp * lisp/org-agenda.el (org-agenda-get-deadlines): (org-agenda-get-scheduled): Ignore SCHEDULED/DEADLINE set to inactive timestamps. Previously, an error would be thrown. Reported-by: Christian Barthel Link: https://orgmode.org/list/875y5tlouo.fsf@localhost --- lisp/org-agenda.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 57cddcfe9..0f61d75bb 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6335,6 +6335,11 @@ specification like [h]h:mm." (org-element-cache-map (lambda (el) (when (and (org-element-property :deadline el) + ;; Only consider active timestamp values. + (memq (org-element-property + :type + (org-element-property :deadline el)) + '(diary active active-range)) (or (not with-hour) (org-element-property :hour-start @@ -6536,6 +6541,11 @@ scheduled items with an hour specification like [h]h:mm." (org-element-cache-map (lambda (el) (when (and (org-element-property :scheduled el) + ;; Only consider active timestamp values. + (memq (org-element-property + :type + (org-element-property :scheduled el)) + '(diary active active-range)) (or (not with-hour) (org-element-property :hour-start