Function: todo-file-item
todo-file-item is an interactive and byte-compiled function defined in
otodo-mode.el.gz.
Signature
(todo-file-item &optional COMMENT)
Documentation
File the current TODO list entry away, annotated with an optional COMMENT.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/otodo-mode.el.gz
(defun todo-file-item (&optional comment)
"File the current TODO list entry away, annotated with an optional COMMENT."
(interactive "sComment: ")
(or (> (count-lines (point-min) (point-max)) 0)
(error "No TODO list entry to file away"))
(let ((time-stamp-format todo-time-string-format))
(when (and comment (> (length comment) 0))
(goto-char (todo-item-end))
(insert
(if (save-excursion (beginning-of-line)
(looking-at (regexp-quote todo-prefix)))
" "
"\n\t")
"(" comment ")"))
(goto-char (todo-item-end))
(insert " [" (nth todo-category-number todo-categories) "]")
(todo-item-start)
(let ((temp-point (point)))
(if (looking-at (regexp-quote todo-prefix))
(replace-match (time-stamp-string))
;; Standard prefix -> timestamp
;; Else prefix non-standard item start with timestamp
(insert (time-stamp-string)))
(append-to-file temp-point (todo-item-end 'include-sep) todo-file-done)
(delete-region temp-point (todo-item-end 'include-sep)))
(todo-backward-item)
(message "")))