From: Matt Price <moptop99@gmail.com>
To: emacs-orgmode@gnu.org
Subject: function to change TODO status and refile to a predetermined location
Date: Sun, 20 Jun 2010 09:01:53 -0400 [thread overview]
Message-ID: <AANLkTinCY0b3ULGBRB1zF1xte3bWMReSPyDnc_i-ntux@mail.gmail.com> (raw)
hi,
i have a file "Collect.org" in which i collect items that need
processing. Every morning I go through the file, decide what needs to
be done with each item, and refile it. The outcomes are pretty
stereotyped, so for instance, if it's a project idea, I tag it with
:project:, give it the status TODO, and refile it in Projets.org; if
it's a simple task, I also give it the status TODO, but refile it in
gtd.org; and if it's a reminder about something I'm waiting on from
someone else, I give it the status WAITING, and also refile it in
gtd.org.
I'd like to write a function that automates these tasks for me. The
idea is to have a keybinding (though my key map seems really full!)
that works a little bit like the rmemember template keybinding -- one
function, but with options that infoke slightly different outcomes.
so, say,
C-c f p = refile as a project
C-c f a = refile as an action
C-c f w = refile as 'waiting'
My elisp is *terrible* though and I was hoping for some help. I can
see that for each option I want to perform:
(org-todo "STATE")
and then something like
(org-refile)
-- except that I want to pre-specify a refiling location. Is this
something I can do? I figure it must be possible since org-remember
does it, but my quick reading of that code didn't help me much.
also, it seems to me I need something like an array, in which the
final character in the keybinding determines values for the TODO
state, the refiling location, and in some cases a tag (i'm not sure
what function to call to add a tag to a heading -- it looks like
org-set-tags doesn't take any arguments, so I guess that won't
work...). Can someone give me some pasic advice on building a
function like that?
I appreciate all the help! Thanks so much,
Matt
next reply other threads:[~2010-06-20 13:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-20 13:01 Matt Price [this message]
2010-06-20 16:03 ` function to change TODO status and refile to a predetermined location Bernt Hansen
[not found] ` <AANLkTil0pvLAHdrLpltdWlMm2JGnSme3_Jr_Lsmtq-hB@mail.gmail.com>
2010-06-21 1:36 ` Matt Price
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTinCY0b3ULGBRB1zF1xte3bWMReSPyDnc_i-ntux@mail.gmail.com \
--to=moptop99@gmail.com \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.