From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Regression: Empty TODO lines Date: Sun, 13 Nov 2011 12:30:39 +0100 Message-ID: <71A67E1B-33FC-4191-966B-AC233D71E7F6@gmail.com> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPYGs-0006o9-Vm for emacs-orgmode@gnu.org; Sun, 13 Nov 2011 06:30:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPYGr-0001Wo-Mj for emacs-orgmode@gnu.org; Sun, 13 Nov 2011 06:30:46 -0500 Received: from mail-ey0-f169.google.com ([209.85.215.169]:45656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPYGr-0001Wc-8K for emacs-orgmode@gnu.org; Sun, 13 Nov 2011 06:30:45 -0500 Received: by eye4 with SMTP id 4so4939668eye.0 for ; Sun, 13 Nov 2011 03:30:43 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Orgmode Mailing List Cc: Nicolas Goaziou 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)