emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: emacs-orgmode@gnu.org
Subject: Re: org-mode and Gnus integration
Date: Mon, 14 May 2007 20:16:38 +0200	[thread overview]
Message-ID: <87odknqni1.fsf@bzg.ath.cx> (raw)
In-Reply-To: <87bqgo98r7.fsf@memetrics.com> (Alain Picard's message of "Sun\, 13 May 2007 23\:02\:36 +1000")

Alain Picard <Alain.Picard@memetrics.com> 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

  parent reply	other threads:[~2007-05-14 18:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-13 13:02 org-mode and Gnus integration Alain Picard
2007-05-14 13:07 ` Alain Picard
2007-05-14 18:16 ` Bastien [this message]
2007-05-15 18:31   ` Carsten Dominik
2007-05-16 16:46     ` Bastien
2007-05-16 22:33       ` Alain Picard
2007-05-15 11:41 ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87odknqni1.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).