From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: org-mode and Gnus integration Date: Mon, 14 May 2007 20:16:38 +0200 Message-ID: <87odknqni1.fsf@bzg.ath.cx> References: <87bqgo98r7.fsf@memetrics.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HnfE1-0003Zq-2v for emacs-orgmode@gnu.org; Mon, 14 May 2007 14:24:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HnfDz-0003Ye-9i for emacs-orgmode@gnu.org; Mon, 14 May 2007 14:24:48 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HnfDy-0003YN-UD for emacs-orgmode@gnu.org; Mon, 14 May 2007 14:24:46 -0400 Received: from ug-out-1314.google.com ([66.249.92.168]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hnf6B-0006bE-LV for emacs-orgmode@gnu.org; Mon, 14 May 2007 14:16:43 -0400 Received: by ug-out-1314.google.com with SMTP id j3so1219351ugf for ; Mon, 14 May 2007 11:16:41 -0700 (PDT) In-Reply-To: <87bqgo98r7.fsf@memetrics.com> (Alain Picard's message of "Sun\, 13 May 2007 23\:02\:36 +1000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Alain Picard 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