[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Integration of Org mode and Gnus

From: Bastien
Subject: Re: [Orgmode] Integration of Org mode and Gnus
Date: Wed, 18 Jul 2007 02:55:01 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux)

"Georg C. F. Greve" <address@hidden> writes:

> Ideally, I'd like to make a decision on email when I find them in the
> inboxes, and either archive them without a link, or archive them with a
> link for my Org mode files. The same goes for mail I send.

Alain Picard suggested something on this list earlier:

It allows you to quickly store Gnus mails in a section of your org file.
Just press ">" when on the mail you want to store.

(setq *org-email-todo-tree-header* "* Email TODOS")
(setq *org-email-todo-list-buffer* "~/org/bzg.org")

(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)))
      (find-file *org-email-todo-list-buffer*)
      (goto-char (point-min))
      (let ((state (if kw (completing-read "State: " 
                                           (mapcar (lambda(x) (list x))
                                           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*))

(define-key gnus-summary-mode-map ">" 'org-insert-email-as-current-todo)

You might be also interested by the "bookmark" facility that comes with

,----[ gnus-bookmark.el ]
| Set a Gnus bookmark (from the summary buffer):
| M-x gnus-bookmark-set 
| Jump to a Gnus bookmark:
| M-x gnus-bookmark-jump
| Display a list of bookmarks:
| M-x gnus-bookmark-bmenu-list

> So for sending mail and for moving mail to archive folders, I would
> like to be able to memorise a link for the email in its *final
> storage* location.

If you want the links to your mails being always up-to-date, either
create links when mails are at their final place or use nnir.el (as
proposed by Jason).  I'm afraid there is no easy way otherwise...

> Does anyone have an idea of the "right" solution to this?

I think the easiest solution is to use Gnus native bookmarks, except if
your emails are part of something you have to do.

Hope this helps!


reply via email to

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