From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Bug: org-agenda-get-todos: Wrong type argument: integer-or-marker-p, nil [7.9.2 (7.9.2-181-ge8aaca-elpa @ c:/users/--------/documents/store/.emacs.d/elpa/org-20121231/)] Date: Thu, 03 Jan 2013 14:48:35 -0500 Message-ID: <12001.1357242515@alphaville> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqqmO-0002uD-Sc for emacs-orgmode@gnu.org; Thu, 03 Jan 2013 14:48:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqqmN-0006c3-Iw for emacs-orgmode@gnu.org; Thu, 03 Jan 2013 14:48:40 -0500 Received: from g1t0029.austin.hp.com ([15.216.28.36]:8421) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqqmN-0006bZ-By for emacs-orgmode@gnu.org; Thu, 03 Jan 2013 14:48:39 -0500 In-Reply-To: Message from "Andrews, Kyle (KC)" of "Thu, 03 Jan 2013 15:54:14 GMT." 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: "Andrews, Kyle (KC)" Cc: "emacs-orgmode@gnu.org" Andrews, Kyle (KC) wrote: > When I try to rebuild the agenda buffer to display only TODO's with "1 r" I= > get the error: > > > org-agenda-get-todos: Wrong type argument: integer-or-marker-p, nil > > > And then the buffer is left blank. > > Here is the backtrace: > > > Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil) > goto-char(nil) > (if org-agenda-todo-list-sublevels (goto-char (match-end 2)) (org-end-of-= > subtree (quote invisible))) > ... > org-agenda-get-todos() > (setq rtn (org-agenda-get-todos)) > ... > org-agenda-get-day-entries("c:/users/-------/documents/store/emacs/emacs.org" (1 3 2013) :todo) > (setq rtn (org-agenda-get-day-entries file date :todo)) > ... > org-todo-list(1) org-agenda-get-todos loops trying to match the text in the file against a regexp: ,---- | (while (re-search-forward regexp nil t) | (catch :skip | (save-match-data | ...) | (goto-char (match-beginning 2)) | (setq marker (org-agenda-new-marker (match-beginning 0)) | category (org-get-category) | category-pos (get-text-property (point) 'org-category-position) | txt (org-trim | (buffer-substring (match-beginning 2) (match-end 0))) | tags (org-get-tags-at (point)) | level (make-string (org-reduced-level (org-outline-level)) ? ) | txt (org-agenda-format-item "" txt level category tags t) | priority (1+ (org-get-priority txt)) | todo-state (org-get-todo-state)) | (org-add-props txt props | 'org-marker marker 'org-hd-marker marker | 'priority priority 'org-category category | 'level level | 'org-category-position category-pos | 'type "todo" 'todo-state todo-state) | (push txt ee) | (if org-agenda-todo-list-sublevels | (goto-char (match-end 2)) <<<<<< fails here | (org-end-of-subtree 'invisible)))) `---- So the match was not able to provide a non-nil (match-end 2), probably because of a headline missing some essential ingredient, perhaps, maybe. Check the emacs.org file carefully. If you run it again, when it bombs out, you can examine variables with ``e'' and perhaps get a better idea of where the suspect headline might be. Another way to debug it is to save a backup of your emacs.org file and then systematically cut it down by keeping (roughly) the half that produces the error until you've narrowed it down to the headline that causes the error. > Maybe it is related to this issue? > > http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg00310.html > I'd say probably not. Nick