emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: New keywords for org-agenda-sorting-strategy give "wrong ty


From: Richard Lawrence
Subject: Re: [O] Bug: New keywords for org-agenda-sorting-strategy give "wrong type argument" error [8.0 (release_8.0-1-g5ef07d @ /home/rwl/src/org-mode/lisp/)]
Date: Fri, 19 Apr 2013 18:36:46 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

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

[Prev in Thread] Current Thread [Next in Thread]