Re: [O] 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/)]

2013-01-05 Thread Bastien
Hi Kyle,

Andrews, Kyle (KC) kcandr...@dow.com writes:

 I attached a minimal document that causes the error. It has a ``#+TODO:''
 line at the top which does not list ``TODO'' as a TODO state.  Meanwhile,
 in other documents in directories listed in my org-agenda-files I have many
 TODO entries.  When org-agenda tried to collect just my TODO headlines, it
 found one in a file with locally defined TODO words but without TODO. That
 caused the error.

I'm not sure I understand this very well but I assume the error you
reported is not due to Org then.

 Is it possible to add additional TODO keywords to a local file without
 excluding the global keywords?

IIUC I don't think so.  If TODO keywords are set locally, only those
keywords will be known.  If they are not set locally, global setting
will be taken into account.

-- 
 Bastien



Re: [O] 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/)]

2013-01-04 Thread Andrews, Kyle (KC)
Hi Bastien,

I followed Nick's advice and tried to isolate an offending headline in my 
emacs.org. It turns out I can't have a headline called:

* TODO some headline text REGEXP

or simply,

* TODO REGEXP


Regards,

Kyle

-Original Message-
From: Bastien Guerry [mailto:bastiengue...@gmail.com] On Behalf Of Bastien
Sent: Thursday, January 03, 2013 17:47
To: Andrews, Kyle (KC)
Cc: 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/)]

Hi Andrew,

Andrews, Kyle (KC) kcandr...@dow.com writes:

 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

I can't reproduce this -- could you provide a minimal recipe to
reproduce the bug ?

Thanks,

-- 
 Bastien





Re: [O] 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/)]

2013-01-04 Thread Andrews, Kyle (KC)
I take it back.  I can make a headline called * TODO REGEXP.  I just know that 
when I removed that one specific headline from my file, the agenda started 
working. I don't know what was special about it.  If I changed the text to not 
include REGEXP, it still didn't work.

Kyle

-Original Message-
From: Andrews, Kyle (KC) 
Sent: Friday, January 04, 2013 10:18
To: 'Bastien'
Cc: emacs-orgmode@gnu.org; 'nicholas.do...@hp.com'
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/)]

Hi Bastien,

I followed Nick's advice and tried to isolate an offending headline in my 
emacs.org. It turns out I can't have a headline called:

* TODO some headline text REGEXP

or simply,

* TODO REGEXP


Regards,

Kyle

-Original Message-
From: Bastien Guerry [mailto:bastiengue...@gmail.com] On Behalf Of Bastien
Sent: Thursday, January 03, 2013 17:47
To: Andrews, Kyle (KC)
Cc: 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/)]

Hi Andrew,

Andrews, Kyle (KC) kcandr...@dow.com writes:

 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

I can't reproduce this -- could you provide a minimal recipe to
reproduce the bug ?

Thanks,

-- 
 Bastien





Re: [O] 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/)]

2013-01-04 Thread Bastien
Hi Andrews,

Andrews, Kyle (KC) kcandr...@dow.com writes:

 I followed Nick's advice and tried to isolate an offending headline in
 my emacs.org. It turns out I can't have a headline called:

I still can't reproduce the problem.

Here is the recipe I used:

1. have a ~/test.org containing * TODO REGEXP
2. emacs -Q --find ~/test.org
3. C-c [
3. M-x org-agenda RET  t 1 r

And no error.

Can you reproduce the error with another file yourtest.org 
and share it with us?

Thanks,

-- 
 Bastien



Re: [O] 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/)]

2013-01-04 Thread Andrews, Kyle (KC)
I attached a minimal document that causes the error. It has a ``#+TODO:'' line 
at the top which does not list ``TODO'' as a TODO state.  Meanwhile, in other 
documents in directories listed in my org-agenda-files I have many TODO 
entries.  When org-agenda tried to collect just my TODO headlines, it found one 
in a file with locally defined TODO words but without TODO. That caused the 
error.

Is it possible to add additional TODO keywords to a local file without 
excluding the global keywords? 

Regards,

Kyle

-Original Message-
From: Bastien Guerry [mailto:bastiengue...@gmail.com] On Behalf Of Bastien
Sent: Friday, January 04, 2013 10:34
To: Andrews, Kyle (KC)
Cc: nicholas.do...@hp.com; 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/)]

Hi Andrews,

Andrews, Kyle (KC) kcandr...@dow.com writes:

 I followed Nick's advice and tried to isolate an offending headline in
 my emacs.org. It turns out I can't have a headline called:

I still can't reproduce the problem.

Here is the recipe I used:

1. have a ~/test.org containing * TODO REGEXP
2. emacs -Q --find ~/test.org
3. C-c [
3. M-x org-agenda RET  t 1 r

And no error.

Can you reproduce the error with another file yourtest.org 
and share it with us?

Thanks,

-- 
 Bastien



another-file.org
Description: another-file.org


Re: [O] 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/)]

2013-01-03 Thread Nick Dokos
Andrews, Kyle (KC) kcandr...@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



Re: [O] 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/)]

2013-01-03 Thread Nick Dokos
Nick Dokos nicholas.do...@hp.com wrote:

 Andrews, Kyle (KC) kcandr...@dow.com wrote:
 
 
  Maybe it is related to this issue?
  
  http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg00310.html
  
 
 I'd say probably not.
 

Well, looking at it some more, you may very well be right:
org-get-category is saving match data now after the fix in the above
message, but perhaps some other call is not.

Nick




Re: [O] 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/)]

2013-01-03 Thread Bastien
Hi Andrew,

Andrews, Kyle (KC) kcandr...@dow.com writes:

 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

I can't reproduce this -- could you provide a minimal recipe to
reproduce the bug ?

Thanks,

-- 
 Bastien