"-\\_>" ""
(replace-regexp-in-string
"-+" "-"
+ ;; FIXME: "todos-insert-item-"
(concat "todos-item-insert-"
(mapconcat (lambda (e) (if e (symbol-name e))) arglist "-")))))
todos-insertion-commands-args)
"List of names of Todos insertion commands.")
+;; FIXME: prefix argument ARG is nil
(defmacro todos-define-insertion-command (&rest args)
(let ((name (intern (todos-insertion-command-name args)))
(arg0 (nth 0 args))
(arg2 (nth 2 args))
(arg3 (nth 3 args))
(arg4 (nth 4 args)))
- `(defun ,name (&optional arg)
+ `(defun ,name (&optional arg &rest args)
"Todos item insertion command generated from ARGS."
- (interactive)
+ (interactive (list current-prefix-arg))
(todos-insert-item arg ',arg0 ',arg1 ',arg2 ',arg3 ',arg4))))
+;; FIXME: exclude todos-insert-item (or rather from
+;; todos-insertion-key-bindings?), otherwise its doc string won't be
+;; found with C-h k (but it will with M-x todos-insert-item)
(defvar todos-insertion-commands
(mapcar (lambda (c)
(eval `(todos-define-insertion-command ,@c)))
"\\(\n\\)[^[:blank:]]"
(concat "\n" (make-string todos-indent-to-here 32))
new-item nil nil 1))
+ ;; FIXME: after jumping to another category due to `C-u i h',
+ ;; item is inserted as first item -- ok?
(if here
(cond ((not (eq major-mode 'todos-mode))
(error "Cannot insert a todo item here outside of Todos mode"))
(insert diary-nonmarking-symbol))))
(todos-forward-item)))))))
+;; FIXME: Make NOP if point isn't on a todo item (cf. todos-copy-item,
+;; todos-move-item
(defun todos-set-item-priority (&optional item cat new arg)
"Set todo ITEM's priority in CATegory and move item accordingly.