emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Org-Agenda doesn't work


From: Nick Dokos
Subject: Re: [O] Org-Agenda doesn't work
Date: Sat, 12 Apr 2014 09:17:21 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

David Masterson <address@hidden> 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 via email to

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