Indeed, the following patch seems to fix the issue for me, though I
don't know enough about the code to know if this is
clean/elegant/general enough:

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 631c6d0..c53c8c8 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6989,9 +6989,9 @@ or \"timestamp_ia\", compare within each of these type.
 When TYPE is the empty string, compare all timestamps
 without respect of their type."
   (let* ((def (if org-sort-agenda-notime-is-late 9901 -1))
-        (ta (or (and (string-match type (get-text-property 1 'type a))
+        (ta (or (and (string-match type (or (get-text-property 1 'type a) ""))
                      (get-text-property 1 'ts-date a)) def))
-        (tb (or (and (string-match type (get-text-property 1 'type b))
+        (tb (or (and (string-match type (or (get-text-property 1 'type b) ""))
                      (get-text-property 1 'ts-date b)) def)))
     (cond ((< ta tb) -1)
          ((< tb ta) +1))))

-- 
Best,
Richard


Reply via email to