[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] org-mode and Gnus integration
From: |
Bastien |
Subject: |
Re: [Orgmode] org-mode and Gnus integration |
Date: |
Wed, 16 May 2007 18:46:33 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux) |
Carsten Dominik <address@hidden> 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