From 3c4847cf67da2e65f4f8d1dd9514ffd7ff464061 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Thu, 7 Feb 2013 10:32:43 +0100 Subject: [PATCH] org-agenda.el (org-agenda-get-todos): Skip diary sexps when trying to sort by timestamp * org-agenda.el (org-agenda-get-todos): Skip diary sexps when trying to sort by timestamp. Thanks to Kyle Machulis for reporting this problem. --- lisp/org-agenda.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index e9a9efccd..54dbeea78 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -5485,7 +5485,9 @@ the documentation of `org-diary'." (org-entry-get (point) "TIMESTAMP_IA")) ts-date-type "")) (t (setq ts-date-type ""))) - (when ts (org-time-string-to-absolute ts)))) + (when ts (or (ignore-errors (org-time-string-to-absolute ts)) + ;; We skip diary sexp because `date' is not bound + (time-to-days nil))))) category-pos (get-text-property (point) 'org-category-position) txt (org-trim (buffer-substring (match-beginning 2) (match-end 0))) -- 2.11.4.GIT