branch: externals/org
commit 7cc208af91fc948b9e7739acecafcf179cad56a0
Author: Ihor Radchenko <yanta...@posteo.net>
Commit: Ihor Radchenko <yanta...@posteo.net>

    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 <b...@online.de>
    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 57cddcfe9e..0f61d75bba 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

Reply via email to