[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Regression: Empty TODO lines
From: |
Carsten Dominik |
Subject: |
[O] Regression: Empty TODO lines |
Date: |
Sun, 13 Nov 2011 12:30:39 +0100 |
Hi Nicolas,
commit dfcb6faef11a2439b56b18a6289803361d402130 (Provide more consistent
regexps for headlines)
makes the global TODO list fail on headlines with a TODO keyword but no text
following:
* TODO This one works
* TODO
This one fails (note, there is not even a space after TODO.
While I agree that a TODO line with not text is not good, I think
it should not break the TODO list view. I am attaching the backtrace.
Cheers
- Carsten
--------------------------------------------------------------------------------------------
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
... end ...) (when ... ... ... ...)) (goto-char (match-beginning 2)) (setq
marker (org-agenda-new-marker ...) category (org-get-category) org-category-pos
(get-text-property ... ...) txt (match-string 2) tags (org-get-tags-at ...) txt
(org-agenda-format-item "" txt category tags) priority (1+ ...) 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) org-category-pos (quote type) "todo" (quote
todo-state) todo-state) (push txt ee) (if org-agenda-todo-list-sublevels
(goto-char ...) (org-end-of-subtree ...)))
(while (re-search-forward regexp nil t) (catch :skip (save-match-data ... ...
... ...) (goto-char ...) (setq marker ... category ... org-category-pos ... txt
... tags ... txt ... priority ... todo-state ...) (org-add-props txt props ...
marker ... marker ... priority ... category ... org-category-pos ... "todo" ...
todo-state) (push txt ee) (if org-agenda-todo-list-sublevels ... ...)))
(let* ((props ...) (regexp ...) marker priority category org-category-pos
tags todo-state ee txt beg end) (goto-char (point-min)) (while
(re-search-forward regexp nil t) (catch :skip ... ... ... ... ... ...))
(nreverse ee))
org-agenda-get-todos()
(setq rtn (org-agenda-get-todos))
(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 ...)))
(while (setq arg (pop args)) (cond (... ... ...) (... ... ... ... ...) (...
... ...) (... ... ...) (... ... ...) (... ... ... ...)))
(save-restriction (if org-agenda-restrict (narrow-to-region
org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (while (setq arg
...) (cond ... ... ... ... ... ...)))
(save-excursion (save-restriction (if org-agenda-restrict ... ...) (while ...
...)))
(let ((case-fold-search nil)) (save-excursion (save-restriction ... ...)))
(save-current-buffer (set-buffer buffer) (unless (eq major-mode ...) (error
"Agenda file %s is not in `org-mode'" file)) (let (...) (save-excursion ...))
results)
(with-current-buffer buffer (unless (eq major-mode ...) (error "Agenda file
%s is not in `org-mode'" file)) (let (...) (save-excursion ...)) results)
(if (not buffer) (list (format "ORG-AGENDA-ERROR: No such org-file %s" file))
(with-current-buffer buffer (unless ... ...) (let ... ...) results))
(let* ((org-startup-folded nil) (org-startup-align-all-tables nil) (buffer
...) arg results rtn deadline-results) (if (not buffer) (list ...)
(with-current-buffer buffer ... ... results)))
org-agenda-get-day-entries("~/org/orgmode.org" (11 13 2011) :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 ...) (setq rtnall ...)))
(let* ((today ...) (date ...) (kwds org-todo-keywords-for-agenda)
(completion-ignore-case t) (org-select-this-todo-keyword ...) rtn rtnall files
file pos) (when (equal arg ...) (setq org-select-this-todo-keyword ...)) (and
(equal 0 arg) (setq org-select-this-todo-keyword nil)) (org-set-local (quote
org-last-arg) arg) (setq org-agenda-redo-command (quote ...)) (setq files
(org-agenda-files nil ...) rtnall nil) (while (setq file ...) (catch ... ...
... ...)) (if org-agenda-overriding-header (insert ... "\n") (insert "Global
list of TODO items of type: ") (add-text-properties ... ... ...)
(org-agenda-mark-header-line ...) (setq pos ...) (insert ... "\n")
(add-text-properties pos ... ...) (setq pos ...) (unless org-agenda-multi ...
... ...) (add-text-properties pos ... ...)) (org-agenda-mark-header-line
(point-min)) (when rtnall (insert ... "\n")) (goto-char (point-min)) (or
org-agenda-multi (org-fit-agenda-window)) (add-text-properties (point-min)
(point-max) (quote ...)) (org-finalize-agenda) (setq buffer-read-only t))
org-todo-list(nil)
call-interactively(org-todo-list)
(cond ((setq entry ...) (if ... ... ...)) ((equal keys "C") (setq
org-agenda-custom-commands org-agenda-custom-commands-orig) (customize-variable
...)) ((equal keys "a") (call-interactively ...)) ((equal keys "s")
(call-interactively ...)) ((equal keys "t") (call-interactively ...)) ((equal
keys "T") (org-call-with-arg ... ...)) ((equal keys "m") (call-interactively
...)) ((equal keys "M") (org-call-with-arg ... ...)) ((equal keys "e")
(call-interactively ...)) ((equal keys "?") (org-tags-view nil "+FLAGGED")
(org-add-hook ... ... t t)) ((equal keys "L") (unless ... ...) (unless
restriction ... ...)) ((equal keys "#") (call-interactively ...)) ((equal keys
"/") (call-interactively ...)) ((equal keys "!") (customize-variable ...)) (t
(error "Invalid agenda key")))
(let* ((prefix-descriptions nil) (org-agenda-window-setup ...)
(org-agenda-custom-commands-orig org-agenda-custom-commands)
(org-agenda-custom-commands ...) (buf ...) (bfn ...) entry key type match
lprops ans) (unless org-agenda-overriding-restriction (unless ... ...) (setq
org-agenda-restrict nil) (move-marker org-agenda-restrict-begin nil)
(move-marker org-agenda-restrict-end nil)) (put (quote org-agenda-redo-command)
(quote org-lprops) nil) (put (quote org-agenda-redo-command) (quote last-args)
nil) (setq org-agenda-last-dispatch-buffer (current-buffer)) (unless keys (setq
ans ... keys ... restriction ...)) (when (and ... restriction) (put ... ...
...) (cond ... ...)) (cond (... ...) (... ... ...) (... ...) (... ...) (...
...) (... ...) (... ...) (... ...) (... ...) (... ... ...) (... ... ...) (...
...) (... ...) (... ...) (t ...)))
(catch (quote exit) (let* (... ... ... ... ... ... entry key type match
lprops ans) (unless org-agenda-overriding-restriction ... ... ... ...) (put ...
... nil) (put ... ... nil) (setq org-agenda-last-dispatch-buffer ...) (unless
keys ...) (when ... ... ...) (cond ... ... ... ... ... ... ... ... ... ... ...
... ... ... ...)))
org-agenda(nil)
call-interactively(org-agenda nil nil)
- [O] Regression: Empty TODO lines,
Carsten Dominik <=