emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: "Andrews, Kyle (KC)" <KCAndrews@dow.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
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	[thread overview]
Message-ID: <12001.1357242515@alphaville> (raw)
In-Reply-To: Message from "Andrews, Kyle (KC)" <KCAndrews@dow.com> of "Thu, 03 Jan 2013 15:54:14 GMT." <EEE1F9F107419E4B9F51F28C04BD9EA2122773@046-CH1MPN1-133.046d.mgd.msft.net>

Andrews, Kyle (KC) <KCAndrews@dow.com> 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

  reply	other threads:[~2013-01-03 19:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-03 15:54 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/)] Andrews, Kyle (KC)
2013-01-03 19:48 ` Nick Dokos [this message]
2013-01-03 22:20   ` Nick Dokos
2013-01-03 22:47 ` Bastien
2013-01-04 15:18   ` Andrews, Kyle (KC)
2013-01-04 15:33     ` Bastien
2013-01-04 16:57       ` Andrews, Kyle (KC)
2013-01-05 11:00         ` Bastien
2013-01-04 15:29   ` Andrews, Kyle (KC)

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=12001.1357242515@alphaville \
    --to=nicholas.dokos@hp.com \
    --cc=KCAndrews@dow.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).