emacs-orgmode
[Top][All Lists]
Advanced

[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: Mon, 14 May 2007 20:16:38 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux)

Alain Picard <address@hidden> writes:

> I don't know if anyone else will find this useful, or already has a
> better way of handling this sort of thing (I haven't found it yet, and
> I did look).

Yes, I find it useful, thanks for this!

> Ideally, I'd like to be able to maybe select different types of tags
> directly when entering (e.g. maybe "C-u 1 >" --> WAITING "C-u 2 >" -->
> NEXT etc) but I haven't implemented that yet.  

Here is a slightly modified version. I added a docstring and the ability
to be prompted for a keyword.  Of course, it would be better if keywords
where proposed as the history for the prompt, but i didn't find an easy
way to "flatten" the `org-todo-keywords' list.

========================================================================
(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 keyword."
  (interactive "P")
  (let ((link (org-store-link nil))
        (keyword 
         (if kw (completing-read "Keyword: " nil nil nil "TODO"))))
    (save-window-excursion
      (find-file *org-email-todo-list-buffer*)
      (goto-char (point-min))
      (let ((point (re-search-forward *org-email-todo-tree-header* (point-max) 
nil)))
        (org-end-of-subtree t)
        (insert "\n** " keyword " ")
        (insert link))))
  (message "Email saved in %s" *org-email-todo-list-buffer*))
========================================================================

> I visit my todo file so often it's not a huge burder to just
> reclassify all the TODOs rapidly in one go.

Maybe we could cycle through keywords for headlines in a *region*?

And (while i'm at it) maybe we could move up and down a whole set of
headlines by moving the region containing them?  I came accross this
need quite often, but i don't know if it's possible to implement it.

-- 
Bastien




reply via email to

[Prev in Thread] Current Thread [Next in Thread]