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

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