emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Lawrence <richard.lawrence@berkeley.edu>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <874nf256fl.fsf@berkeley.edu> (raw)
In-Reply-To: 87bo9a571c.fsf@aristotle.i-did-not-set--mail-host-address--so-tickle-me

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	other threads:[~2013-04-20  1:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-20  1:23 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/)] Richard Lawrence
2013-04-20  1:36 ` Richard Lawrence [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874nf256fl.fsf@berkeley.edu \
    --to=richard.lawrence@berkeley.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).