Carsten Dominik <[EMAIL PROTECTED]> writes:

> On May 14, 2007, at 20:16, Bastien wrote:
>
> `org-todo-keywords-1' is a flat list of all todo keywords,
> including the DONE states.
> `org-not-done-keywords' is a flat list of the states that
> are not done.  

When prefixed, this new version gives choice among not-done states,
taking "TODO" as the default.  

========================================================================
(defun org-insert-email-as-current-todo (&optional kw)
  "Save a Gnus email into `*org-email-todo-list-buffer*' as a headline.
If prefix is non-nil, ask for a specific state."
  (interactive "P")
  (let ((link (org-store-link nil)))
    (save-window-excursion
      (find-file *org-email-todo-list-buffer*)
      (goto-char (point-min))
      (let ((state (if kw (completing-read "State: " 
                                           (mapcar (lambda(x) (list x))
                                                   org-not-done-keywords)
                                           nil t "TODO") "TODO"))
            (point (re-search-forward *org-email-todo-tree-header* 
                                      (point-max) nil)))
        (org-end-of-subtree t)
        (insert "\n** " state " " link))))
  (message "Email saved in %s" *org-email-todo-list-buffer*))
========================================================================

-- 
Bastien


_______________________________________________
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to