Function: todo-forward-category
todo-forward-category is an interactive and byte-compiled function
defined in todo-mode.el.gz.
Signature
(todo-forward-category &optional BACK)
Documentation
Visit the numerically next category in this todo file.
If the current category is the highest numbered, visit the first category. With non-nil argument BACK, visit the numerically previous category (the highest numbered one, if the current category is the first).
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/todo-mode.el.gz
(defun todo-forward-category (&optional back)
"Visit the numerically next category in this todo file.
If the current category is the highest numbered, visit the first
category. With non-nil argument BACK, visit the numerically
previous category (the highest numbered one, if the current
category is the first)."
(interactive)
(let ((setcatnum (lambda () (1+ (mod (- todo-category-number
(if back 2 0))
(length todo-categories))))))
(setq todo-category-number (funcall setcatnum))
(when todo-skip-archived-categories
(while (and (zerop (todo-get-count 'todo))
(zerop (todo-get-count 'done))
(not (zerop (todo-get-count 'archived))))
(setq todo-category-number (funcall setcatnum))))
(todo-category-select)
(if transient-mark-mode (deactivate-mark))
(goto-char (point-min))))