emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Org-Agenda doesn't work
Date: Sat, 12 Apr 2014 09:17:21 -0400	[thread overview]
Message-ID: <877g6uk7q6.fsf@gmail.com> (raw)
In-Reply-To: 86ppknb14d.fsf@gmail.com

David Masterson <dsmasterson@gmail.com> writes:

> I got most of Org working again, but then the following error came up in
> org-agenda.  I removed the ELC files to try to make the error more
> clear.  Anyone know what the problem is?
>
> Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
>   put-text-property(23003 nil org-effort "15")
>   ...
>   org-refresh-properties("Effort" org-effort)
>   ...
>   org-agenda-prepare("TODO")
>   ...
>   org-todo-list(nil)
>   call-interactively(org-todo-list)
>   ...

It's the same error that Ken Mankoff encountered:

     http://thread.gmane.org/gmane.emacs.orgmode/84826

I believe there was one more instance of this but I couldn't find it
in gmane.

Try this patch:

--8<---------------cut here---------------start------------->8---
diff --git a/lisp/org.el b/lisp/org.el
index f8615a2..bd9c05e 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -9393,7 +9393,7 @@ property to set."
 	   (save-excursion
 	     (org-back-to-heading t)
 	     (put-text-property
-	      (point-at-bol) (outline-next-heading) tprop p))))))))
+	      (point-at-bol) (or (outline-next-heading) (point-max)) tprop p))))))))
 
 
 ;;;; Link Stuff
--8<---------------cut here---------------end--------------->8---


Untested and based on some assumptionts that I have not verified: that
outline-next-heading returns a buffer position, except when there is no
next heading, in which case it returns nil. put-text-property wants
buffer positions though, so in that case we return the end-of-buffer
position.

-- 
Nick

  reply	other threads:[~2014-04-12 13:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-12  4:52 Org-Agenda doesn't work David Masterson
2014-04-12 13:17 ` Nick Dokos [this message]
2014-04-12 13:44   ` Nick Dokos
2014-04-12 22:24   ` David Masterson

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=877g6uk7q6.fsf@gmail.com \
    --to=ndokos@gmail.com \
    --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).