emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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 15:54 Andrews, Kyle (KC)
  2013-01-03 19:48 ` Nick Dokos
  2013-01-03 22:47 ` Bastien
  0 siblings, 2 replies; 9+ messages in thread
From: Andrews, Kyle (KC) @ 2013-01-03 15:54 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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:

#+BEGIN_QUOTE

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)))
  (catch :skip (save-match-data (beginning-of-line) (org-agenda-skip) (setq beg (point) end (save-excursion (outline-next-heading) (point))) (when (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item end) (goto-char (1+ beg)) (or org-agenda-todo-list-sublevels (org-end-of-subtree (quote invisible))) (throw :skip nil))) (goto-char (match-beginning 2)) (setq marker (org-agenda-new-marker (match-beginning 0)) category (org-get-category) category-pos (get-text-property (point) (quote org-category-position)) txt (org-trim (buffer-substring (match-beginning 2) (match-end 0))) tags (org-get-tags-at (point)) txt (org-agenda-format-item "" txt category tags t) priority (1+ (org-get-priority txt)) todo-state (org-get-todo-state)) (org-add-props txt props (quote org-marker) marker (quote org-hd-marker) marker (quote priority) priority (quote org-category) category (quote org-category-position) category-pos (quote type) "todo" (quote todo-state) todo-state) (push txt ee) (if org-agenda-todo-list-sublevels (goto-char (match-end 2)) (org-end-of-subtree (quote invisible))))
  (while (re-search-forward regexp nil t) (catch :skip (save-match-data (beginning-of-line) (org-agenda-skip) (setq beg (point) end (save-excursion (outline-next-heading) (point))) (when (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item end) (goto-char (1+ beg)) (or org-agenda-todo-list-sublevels (org-end-of-subtree (quote invisible))) (throw :skip nil))) (goto-char (match-beginning 2)) (setq marker (org-agenda-new-marker (match-beginning 0)) category (org-get-category) category-pos (get-text-property (point) (quote org-category-position)) txt (org-trim (buffer-substring (match-beginning 2) (match-end 0))) tags (org-get-tags-at (point)) txt (org-agenda-format-item "" txt category tags t) priority (1+ (org-get-priority txt)) todo-state (org-get-todo-state)) (org-add-props txt props (quote org-marker) marker (quote org-hd-marker) marker (quote priority) priority (quote org-category) category (quote org-category-position) category-pos (quote type) "todo" (quote todo-state) todo-state) (push txt ee) (if org-agenda-todo-list-sublevels (goto-char (match-end 2)) (org-end-of-subtree (quote invisible)))))
  (let* ((props (list (quote face) nil (quote done-face) (quote org-agenda-done) (quote org-not-done-regexp) org-not-done-regexp (quote org-todo-regexp) org-todo-regexp (quote org-complex-heading-regexp) org-complex-heading-regexp (quote mouse-face) (quote highlight) (quote help-echo) (format "mouse-2 or RET jump to org file %s" (abbreviate-file-name buffer-file-name)))) (regexp (format org-heading-keyword-regexp-format (cond ((and org-select-this-todo-keyword (equal org-select-this-todo-keyword "*")) org-todo-regexp) (org-select-this-todo-keyword (concat "\\(" (mapconcat ... ... "\\|") "\\)")) (t org-not-done-regexp)))) marker priority category category-pos tags todo-state ee txt beg end) (goto-char (point-min)) (while (re-search-forward regexp nil t) (catch :skip (save-match-data (beginning-of-line) (org-agenda-skip) (setq beg (point) end (save-excursion (outline-next-heading) (point))) (when (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item end) (goto-char (1+ beg)) (or org-agenda-todo-list-sublevels (org-end-of-subtree (quote invisible))) (throw :skip nil))) (goto-char (match-beginning 2)) (setq marker (org-agenda-new-marker (match-beginning 0)) category (org-get-category) category-pos (get-text-property (point) (quote org-category-position)) txt (org-trim (buffer-substring (match-beginning 2) (match-end 0))) tags (org-get-tags-at (point)) txt (org-agenda-format-item "" txt category tags t) priority (1+ (org-get-priority txt)) todo-state (org-get-todo-state)) (org-add-props txt props (quote org-marker) marker (quote org-hd-marker) marker (quote priority) priority (quote org-category) category (quote org-category-position) category-pos (quote type) "todo" (quote todo-state) todo-state) (push txt ee) (if org-agenda-todo-list-sublevels (goto-char (match-end 2)) (org-end-of-subtree (quote invisible))))) (nreverse ee))
  org-agenda-get-todos()
  (setq rtn (org-agenda-get-todos))
  (cond ((and (eq arg :todo) (equal date (calendar-gregorian-from-absolute (org-today)))) (setq rtn (org-agenda-get-todos)) (setq results (append results rtn))) ((eq arg :timestamp) (setq rtn (org-agenda-get-blocks)) (setq results (append results rtn)) (setq rtn (org-agenda-get-timestamps deadline-results)) (setq results (append results rtn))) ((eq arg :sexp) (setq rtn (org-agenda-get-sexps)) (setq results (append results rtn))) ((eq arg :scheduled) (setq rtn (org-agenda-get-scheduled deadline-results)) (setq results (append results rtn))) ((eq arg :closed) (setq rtn (org-agenda-get-progress)) (setq results (append results rtn))) ((eq arg :deadline) (setq rtn (org-agenda-get-deadlines)) (setq deadline-results (copy-sequence rtn)) (setq results (append results rtn))))
  (while (setq arg (pop args)) (cond ((and (eq arg :todo) (equal date (calendar-gregorian-from-absolute (org-today)))) (setq rtn (org-agenda-get-todos)) (setq results (append results rtn))) ((eq arg :timestamp) (setq rtn (org-agenda-get-blocks)) (setq results (append results rtn)) (setq rtn (org-agenda-get-timestamps deadline-results)) (setq results (append results rtn))) ((eq arg :sexp) (setq rtn (org-agenda-get-sexps)) (setq results (append results rtn))) ((eq arg :scheduled) (setq rtn (org-agenda-get-scheduled deadline-results)) (setq results (append results rtn))) ((eq arg :closed) (setq rtn (org-agenda-get-progress)) (setq results (append results rtn))) ((eq arg :deadline) (setq rtn (org-agenda-get-deadlines)) (setq deadline-results (copy-sequence rtn)) (setq results (append results rtn)))))
  (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (while (setq arg (pop args)) (cond ((and (eq arg :todo) (equal date (calendar-gregorian-from-absolute (org-today)))) (setq rtn (org-agenda-get-todos)) (setq results (append results rtn))) ((eq arg :timestamp) (setq rtn (org-agenda-get-blocks)) (setq results (append results rtn)) (setq rtn (org-agenda-get-timestamps deadline-results)) (setq results (append results rtn))) ((eq arg :sexp) (setq rtn (org-agenda-get-sexps)) (setq results (append results rtn))) ((eq arg :scheduled) (setq rtn (org-agenda-get-scheduled deadline-results)) (setq results (append results rtn))) ((eq arg :closed) (setq rtn (org-agenda-get-progress)) (setq results (append results rtn))) ((eq arg :deadline) (setq rtn (org-agenda-get-deadlines)) (setq deadline-results (copy-sequence rtn)) (setq results (append results rtn))))))
  (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (while (setq arg (pop args)) (cond ((and (eq arg :todo) (equal date (calendar-gregorian-from-absolute ...))) (setq rtn (org-agenda-get-todos)) (setq results (append results rtn))) ((eq arg :timestamp) (setq rtn (org-agenda-get-blocks)) (setq results (append results rtn)) (setq rtn (org-agenda-get-timestamps deadline-results)) (setq results (append results rtn))) ((eq arg :sexp) (setq rtn (org-agenda-get-sexps)) (setq results (append results rtn))) ((eq arg :scheduled) (setq rtn (org-agenda-get-scheduled deadline-results)) (setq results (append results rtn))) ((eq arg :closed) (setq rtn (org-agenda-get-progress)) (setq results (append results rtn))) ((eq arg :deadline) (setq rtn (org-agenda-get-deadlines)) (setq deadline-results (copy-sequence rtn)) (setq results (append results rtn)))))))
  (let ((case-fold-search nil)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (while (setq arg (pop args)) (cond ((and (eq arg :todo) (equal date ...)) (setq rtn (org-agenda-get-todos)) (setq results (append results rtn))) ((eq arg :timestamp) (setq rtn (org-agenda-get-blocks)) (setq results (append results rtn)) (setq rtn (org-agenda-get-timestamps deadline-results)) (setq results (append results rtn))) ((eq arg :sexp) (setq rtn (org-agenda-get-sexps)) (setq results (append results rtn))) ((eq arg :scheduled) (setq rtn (org-agenda-get-scheduled deadline-results)) (setq results (append results rtn))) ((eq arg :closed) (setq rtn (org-agenda-get-progress)) (setq results (append results rtn))) ((eq arg :deadline) (setq rtn (org-agenda-get-deadlines)) (setq deadline-results (copy-sequence rtn)) (setq results (append results rtn))))))))
  (save-current-buffer (set-buffer buffer) (unless (derived-mode-p (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (setq org-agenda-buffer (or org-agenda-buffer buffer)) (let ((case-fold-search nil)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (while (setq arg (pop args)) (cond ((and ... ...) (setq rtn ...) (setq results ...)) ((eq arg :timestamp) (setq rtn ...) (setq results ...) (setq rtn ...) (setq results ...)) ((eq arg :sexp) (setq rtn ...) (setq results ...)) ((eq arg :scheduled) (setq rtn ...) (setq results ...)) ((eq arg :closed) (setq rtn ...) (setq results ...)) ((eq arg :deadline) (setq rtn ...) (setq deadline-results ...) (setq results ...))))))) results)
  (with-current-buffer buffer (unless (derived-mode-p (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (setq org-agenda-buffer (or org-agenda-buffer buffer)) (let ((case-fold-search nil)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (while (setq arg (pop args)) (cond ((and ... ...) (setq rtn ...) (setq results ...)) ((eq arg :timestamp) (setq rtn ...) (setq results ...) (setq rtn ...) (setq results ...)) ((eq arg :sexp) (setq rtn ...) (setq results ...)) ((eq arg :scheduled) (setq rtn ...) (setq results ...)) ((eq arg :closed) (setq rtn ...) (setq results ...)) ((eq arg :deadline) (setq rtn ...) (setq deadline-results ...) (setq results ...))))))) results)
  (if (not buffer) (list (format "ORG-AGENDA-ERROR: No such org-file %s" file)) (with-current-buffer buffer (unless (derived-mode-p (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (setq org-agenda-buffer (or org-agenda-buffer buffer)) (let ((case-fold-search nil)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (while (setq arg (pop args)) (cond (... ... ...) (... ... ... ... ...) (... ... ...) (... ... ...) (... ... ...) (... ... ... ...)))))) results))
  (let* ((org-startup-folded nil) (org-startup-align-all-tables nil) (buffer (if (file-exists-p file) (org-get-agenda-file-buffer file) (error "No such file %s" file))) arg results rtn deadline-results) (if (not buffer) (list (format "ORG-AGENDA-ERROR: No such org-file %s" file)) (with-current-buffer buffer (unless (derived-mode-p (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (setq org-agenda-buffer (or org-agenda-buffer buffer)) (let ((case-fold-search nil)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (while (setq arg ...) (cond ... ... ... ... ... ...))))) results)))
  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))
  (catch (quote nextfile) (org-check-agenda-file file) (setq rtn (org-agenda-get-day-entries file date :todo)) (setq rtnall (append rtnall rtn)))
  (while (setq file (pop files)) (catch (quote nextfile) (org-check-agenda-file file) (setq rtn (org-agenda-get-day-entries file date :todo)) (setq rtnall (append rtnall rtn))))
  (catch (quote exit) (if org-agenda-sticky (setq org-agenda-buffer-name (if (stringp org-select-this-todo-keyword) (format "*Org Agenda(%s:%s)*" (or org-keys "t") org-select-this-todo-keyword) (format "*Org Agenda(%s)*" (or org-keys "t"))))) (org-agenda-prepare "TODO") (org-compile-prefix-format (quote todo)) (org-set-sorting-strategy (quote todo)) (setq org-agenda-redo-command (\` (org-todo-list (or (and (numberp current-prefix-arg) current-prefix-arg) (\, org-select-this-todo-keyword) current-prefix-arg (\, arg))))) (setq files (org-agenda-files nil (quote ifmode)) rtnall nil) (while (setq file (pop files)) (catch (quote nextfile) (org-check-agenda-file file) (setq rtn (org-agenda-get-day-entries file date :todo)) (setq rtnall (append rtnall rtn)))) (if org-agenda-overriding-header (insert (org-add-props (copy-sequence org-agenda-overriding-header) nil (quote face) (quote org-agenda-structure)) "\n") (insert "Global list of TODO items of type: ") (add-text-properties (point-min) (1- (point)) (list (quote face) (quote org-agenda-structure) (quote short-heading) (concat "ToDo: " (or org-select-this-todo-keyword "ALL")))) (org-agenda-mark-header-line (point-min)) (setq pos (point)) (insert (or org-select-this-todo-keyword "ALL") "\n") (add-text-properties pos (1- (point)) (list (quote face) (quote org-warning))) (setq pos (point)) (unless org-agenda-multi (insert "Available with `N r': (0)[ALL]") (let ((n 0) s) (mapc (lambda (x) (setq s (format "(%d)%s" ... x)) (if (> ... ...) (insert "\n                     ")) (insert " " s)) kwds)) (insert "\n")) (add-text-properties pos (1- (point)) (list (quote face) (quote org-agenda-structure)))) (org-agenda-mark-header-line (point-min)) (when rtnall (insert (org-agenda-finalize-entries rtnall) "\n")) (goto-char (point-min)) (or org-agenda-multi (org-agenda-fit-window-to-buffer)) (add-text-properties (point-min) (point-max) (\` (org-agenda-type todo org-last-args (\, arg) org-redo-cmd (\, org-agenda-redo-command) org-series-cmd (\, org-cmd)))) (org-agenda-finalize) (setq buffer-read-only t))
  (let* ((today (org-today)) (date (calendar-gregorian-from-absolute today)) (kwds org-todo-keywords-for-agenda) (completion-ignore-case t) (org-select-this-todo-keyword (if (stringp arg) arg (and arg (integerp arg) (> arg 0) (nth (1- arg) kwds)))) rtn rtnall files file pos) (when (equal arg (quote (4))) (setq org-select-this-todo-keyword (org-icompleting-read "Keyword (or KWD1|K2D2|...): " (mapcar (quote list) kwds) nil nil))) (and (equal 0 arg) (setq org-select-this-todo-keyword nil)) (catch (quote exit) (if org-agenda-sticky (setq org-agenda-buffer-name (if (stringp org-select-this-todo-keyword) (format "*Org Agenda(%s:%s)*" (or org-keys "t") org-select-this-todo-keyword) (format "*Org Agenda(%s)*" (or org-keys "t"))))) (org-agenda-prepare "TODO") (org-compile-prefix-format (quote todo)) (org-set-sorting-strategy (quote todo)) (setq org-agenda-redo-command (\` (org-todo-list (or (and (numberp current-prefix-arg) current-prefix-arg) (\, org-select-this-todo-keyword) current-prefix-arg (\, arg))))) (setq files (org-agenda-files nil (quote ifmode)) rtnall nil) (while (setq file (pop files)) (catch (quote nextfile) (org-check-agenda-file file) (setq rtn (org-agenda-get-day-entries file date :todo)) (setq rtnall (append rtnall rtn)))) (if org-agenda-overriding-header (insert (org-add-props (copy-sequence org-agenda-overriding-header) nil (quote face) (quote org-agenda-structure)) "\n") (insert "Global list of TODO items of type: ") (add-text-properties (point-min) (1- (point)) (list (quote face) (quote org-agenda-structure) (quote short-heading) (concat "ToDo: " (or org-select-this-todo-keyword "ALL")))) (org-agenda-mark-header-line (point-min)) (setq pos (point)) (insert (or org-select-this-todo-keyword "ALL") "\n") (add-text-properties pos (1- (point)) (list (quote face) (quote org-warning))) (setq pos (point)) (unless org-agenda-multi (insert "Available with `N r': (0)[ALL]") (let ((n 0) s) (mapc (lambda (x) (setq s ...) (if ... ...) (insert " " s)) kwds)) (insert "\n")) (add-text-properties pos (1- (point)) (list (quote face) (quote org-agenda-structure)))) (org-agenda-mark-header-line (point-min)) (when rtnall (insert (org-agenda-finalize-entries rtnall) "\n")) (goto-char (point-min)) (or org-agenda-multi (org-agenda-fit-window-to-buffer)) (add-text-properties (point-min) (point-max) (\` (org-agenda-type todo org-last-args (\, arg) org-redo-cmd (\, org-agenda-redo-command) org-series-cmd (\, org-cmd)))) (org-agenda-finalize) (setq buffer-read-only t)))
  org-todo-list(1)
  eval((org-todo-list (or (and (numberp current-prefix-arg) current-prefix-arg) nil current-prefix-arg nil)))
  (let nil (eval redo-cmd))
  eval((let nil (eval redo-cmd)))
  org-let(nil (eval redo-cmd))
  (if series-redo-cmd (eval series-redo-cmd) (org-let lprops (quote (eval redo-cmd))))
  (let* ((p (or (and (looking-at "\\'") (1- (point))) (point))) (cpa (unless (eq all t) current-prefix-arg)) (org-agenda-doing-sticky-redo org-agenda-sticky) (org-agenda-sticky nil) (org-agenda-buffer-name (or org-agenda-this-buffer-name org-agenda-buffer-name)) (org-agenda-keep-modes t) (tag-filter org-agenda-tag-filter) (tag-preset (get (quote org-agenda-tag-filter) :preset-filter)) (top-cat-filter org-agenda-top-category-filter) (cat-filter org-agenda-category-filter) (cat-preset (get (quote org-agenda-category-filter) :preset-filter)) (org-agenda-tag-filter-while-redo (or tag-filter tag-preset)) (cols org-agenda-columns-active) (line (org-current-line)) (window-line (- line (org-current-line (window-start)))) (lprops (get (quote org-agenda-redo-command) (quote org-lprops))) (redo-cmd (get-text-property p (quote org-redo-cmd))) (last-args (get-text-property p (quote org-last-args))) (org-agenda-overriding-cmd (get-text-property p (quote org-series-cmd))) (org-agenda-overriding-cmd-arguments (unless (eq all t) (cond ((listp last-args) (cons (or cpa ...) (cdr last-args))) ((stringp last-args) last-args)))) (series-redo-cmd (get-text-property p (quote org-series-redo-cmd)))) (put (quote org-agenda-tag-filter) :preset-filter nil) (put (quote org-agenda-category-filter) :preset-filter nil) (and cols (org-columns-quit)) (message "Rebuilding agenda buffer...") (if series-redo-cmd (eval series-redo-cmd) (org-let lprops (quote (eval redo-cmd)))) (setq org-agenda-undo-list nil org-agenda-pending-undo-list nil) (message "Rebuilding agenda buffer...done") (put (quote org-agenda-tag-filter) :preset-filter tag-preset) (put (quote org-agenda-category-filter) :preset-filter cat-preset) (and (or tag-filter tag-preset) (org-agenda-filter-apply tag-filter (quote tag))) (and (or cat-filter cat-preset) (org-agenda-filter-apply cat-filter (quote category))) (and top-cat-filter (org-agenda-filter-top-category-apply top-cat-filter)) (and cols (org-called-interactively-p (quote any)) (org-agenda-columns)) (org-goto-line line) (recenter window-line))
  org-agenda-redo(1)
  call-interactively(org-agenda-redo nil nil)

#+END_QUOTE

Maybe it is related to this issue?

http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg00310.html


Regards,

Kyle Andrews

Emacs  : GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601)
 of 2012-08-28 on MARVIN
Package: Org-mode version 7.9.2 (7.9.2-181-ge8aaca-elpa @ c:/users/-------/documents/store/.emacs.d/elpa/org-20121231/)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* 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/)]
  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
  2013-01-03 22:20   ` Nick Dokos
  2013-01-03 22:47 ` Bastien
  1 sibling, 1 reply; 9+ messages in thread
From: Nick Dokos @ 2013-01-03 19:48 UTC (permalink / raw)
  To: Andrews, Kyle (KC); +Cc: emacs-orgmode@gnu.org

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* 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/)]
  2013-01-03 19:48 ` Nick Dokos
@ 2013-01-03 22:20   ` Nick Dokos
  0 siblings, 0 replies; 9+ messages in thread
From: Nick Dokos @ 2013-01-03 22:20 UTC (permalink / raw)
  Cc: Andrews, Kyle (KC), emacs-orgmode@gnu.org

Nick Dokos <nicholas.dokos@hp.com> wrote:

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* 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/)]
  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
@ 2013-01-03 22:47 ` Bastien
  2013-01-04 15:18   ` Andrews, Kyle (KC)
  2013-01-04 15:29   ` Andrews, Kyle (KC)
  1 sibling, 2 replies; 9+ messages in thread
From: Bastien @ 2013-01-03 22:47 UTC (permalink / raw)
  To: Andrews, Kyle (KC); +Cc: emacs-orgmode@gnu.org

Hi Andrew,

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* 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/)]
  2013-01-03 22:47 ` Bastien
@ 2013-01-04 15:18   ` Andrews, Kyle (KC)
  2013-01-04 15:33     ` Bastien
  2013-01-04 15:29   ` Andrews, Kyle (KC)
  1 sibling, 1 reply; 9+ messages in thread
From: Andrews, Kyle (KC) @ 2013-01-04 15:18 UTC (permalink / raw)
  To: Bastien; +Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org

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:bastienguerry@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)" <KCAndrews@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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* 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/)]
  2013-01-03 22:47 ` Bastien
  2013-01-04 15:18   ` Andrews, Kyle (KC)
@ 2013-01-04 15:29   ` Andrews, Kyle (KC)
  1 sibling, 0 replies; 9+ messages in thread
From: Andrews, Kyle (KC) @ 2013-01-04 15:29 UTC (permalink / raw)
  To: Bastien; +Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org

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.dokos@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:bastienguerry@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)" <KCAndrews@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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* 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/)]
  2013-01-04 15:18   ` Andrews, Kyle (KC)
@ 2013-01-04 15:33     ` Bastien
  2013-01-04 16:57       ` Andrews, Kyle (KC)
  0 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2013-01-04 15:33 UTC (permalink / raw)
  To: Andrews, Kyle (KC); +Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org

Hi Andrews,

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* 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/)]
  2013-01-04 15:33     ` Bastien
@ 2013-01-04 16:57       ` Andrews, Kyle (KC)
  2013-01-05 11:00         ` Bastien
  0 siblings, 1 reply; 9+ messages in thread
From: Andrews, Kyle (KC) @ 2013-01-04 16:57 UTC (permalink / raw)
  To: Bastien; +Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1454 bytes --]

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:bastienguerry@gmail.com] On Behalf Of Bastien
Sent: Friday, January 04, 2013 10:34
To: Andrews, Kyle (KC)
Cc: nicholas.dokos@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)" <KCAndrews@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


[-- Attachment #2: another-file.org --]
[-- Type: application/octet-stream, Size: 59 bytes --]

#+TITLE: another file
#+TODO: HOME WORK | DONE

* TODO Cat

^ permalink raw reply	[flat|nested] 9+ messages in thread

* 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/)]
  2013-01-04 16:57       ` Andrews, Kyle (KC)
@ 2013-01-05 11:00         ` Bastien
  0 siblings, 0 replies; 9+ messages in thread
From: Bastien @ 2013-01-05 11:00 UTC (permalink / raw)
  To: Andrews, Kyle (KC); +Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org

Hi Kyle,

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-01-05 11:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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)

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).