Function: todo-item-start
todo-item-start is a byte-compiled function defined in
todo-mode.el.gz.
Signature
(todo-item-start)
Documentation
Move to start of current todo item and return its position.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/todo-mode.el.gz
(defun todo-item-start ()
"Move to start of current todo item and return its position."
(unless (or
;; Buffer is empty (invocation possible e.g. via todo-forward-item
;; from todo-filter-items when processing category with no todo
;; items).
(eq (point-min) (point-max))
;; Point is on the empty line below category's last todo item...
(and (looking-at "^$")
(or (eobp) ; ...and done items are hidden...
(save-excursion ; ...or done items are visible.
(forward-line)
(looking-at (concat "^"
(regexp-quote todo-category-done))))))
;; Point is on done items separator.
(save-excursion (beginning-of-line) (looking-at todo-category-done))
;; Buffer is widened.
(looking-at (regexp-quote todo-category-beg))
;; Moving an item to a todo file (with `C-u m') that had
;; not yet been read into a buffer puts point at the
;; beginning of the file, from where it is impossible to
;; reach todo-item-start by the loop below (bug#66994).
(= (point) 1))
(goto-char (line-beginning-position))
(while (not (looking-at todo-item-start))
(forward-line -1))
(point)))