From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: function to change TODO status and refile to a predetermined location Date: Sun, 20 Jun 2010 21:36:56 -0400 Message-ID: References: <87y6e9669c.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=33394 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQVwZ-0000pg-Cm for emacs-orgmode@gnu.org; Sun, 20 Jun 2010 21:37:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQVwY-0008FU-68 for emacs-orgmode@gnu.org; Sun, 20 Jun 2010 21:36:59 -0400 Received: from mail-iw0-f169.google.com ([209.85.214.169]:61395) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQVwY-0008FQ-1P for emacs-orgmode@gnu.org; Sun, 20 Jun 2010 21:36:58 -0400 Received: by iwn39 with SMTP id 39so1175468iwn.0 for ; Sun, 20 Jun 2010 18:36:57 -0700 (PDT) In-Reply-To: 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 On Sun, Jun 20, 2010 at 12:03 PM, Bernt Hansen wrote: > Matt Price writes: > >> i have a file "Collect.org" in which i collect items that need >> processing. =A0Every morning I go through the file, decide what needs to >> be done with each item, and refile it. =A0The 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. =A0The >> 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 =3D refile as a project >> C-c f a =3D refile as an action >> C-c f w =3D refile as 'waiting' >> >> My elisp is *terrible* though and I was hoping for some help. =A0I 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. =A0Is 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...). =A0Can someone give me some pasic advice on building a >> function like that? > > My refile.org is your Collect.org. =A0I tend to collect things in here up > to a week and then refile things away to appropriate locations. =A0Bulk > refiling is really useful here - from the agenda mark the tasks you want > to refile together and move them all to a single target. > > I've never needed a refiling function as you describe to keep up with my > refile tasks. =A0I tend to clock everything I work on and at the end of > the day if there is clocked time on a refile task I refile it > immediately to its target location. =A0The remaining refile tasks can > remain in the collection bin until my weekly review. > > I find during refiling I can just up-arrow to select previous refile > targets and this is really convenient. > > HTH, > Bernt > hmm. =A0i don't use clocking. =A0bulk refiling will really help but it'd be quicker to have direct keybindings. =A0i'll keep thinking about it.