Function: todo-insert-item

todo-insert-item is an interactive and byte-compiled function defined in otodo-mode.el.gz.

Signature

(todo-insert-item ARG)

Documentation

Insert new TODO list entry.

With a prefix argument ARG solicit the category, otherwise use the current category.

Key Bindings

Aliases

todo-cmd-inst

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/otodo-mode.el.gz
;;;###autoload
(defun todo-insert-item (arg)
  "Insert new TODO list entry.
With a prefix argument ARG solicit the category, otherwise use the current
category."
  (interactive "P")
  (save-excursion
    (if (not (derived-mode-p 'todo-mode)) (todo-show))
    (let* ((new-item (concat todo-prefix " "
			     (read-from-minibuffer
			      "New TODO entry: "
			      (if todo-entry-prefix-function
				  (funcall todo-entry-prefix-function)))))
	   (current-category (nth todo-category-number todo-categories))
	   (category (if arg (todo-completing-read) current-category)))
      (todo-add-item-non-interactively new-item category))))