From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Lawrence Subject: Re: 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 Message-ID: <874nf256fl.fsf@berkeley.edu> References: <87bo9a571c.fsf@aristotle.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:60115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTMh3-0006X1-KG for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 21:34:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UTMh2-0001oT-Ke for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 21:34:21 -0400 Received: from plane.gmane.org ([80.91.229.3]:40268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTMh2-0001oO-ED for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 21:34:20 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UTMgy-0003ee-1C for emacs-orgmode@gnu.org; Sat, 20 Apr 2013 03:34:16 +0200 Received: from c-67-164-33-170.hsd1.ca.comcast.net ([67.164.33.170]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 20 Apr 2013 03:34:16 +0200 Received: from richard.lawrence by c-67-164-33-170.hsd1.ca.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 20 Apr 2013 03:34:16 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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