From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Owen Subject: Advice on writing a refile to heading function? Date: Fri, 29 Mar 2013 12:51:00 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b34335c27ee8104d90fb92b Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULYlv-0007RF-Pq for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 08:51:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULYlr-0002YR-5P for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 08:51:07 -0400 Received: from mail-lb0-f179.google.com ([209.85.217.179]:51638) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULYlq-0002Xx-TM for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 08:51:03 -0400 Received: by mail-lb0-f179.google.com with SMTP id t1so297946lbd.38 for ; Fri, 29 Mar 2013 05:51:01 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --047d7b34335c27ee8104d90fb92b Content-Type: text/plain; charset=ISO-8859-1 Hi, I am writing a Pomodoro minor mode on top of org-mode. I'm planning to maintain an Activity Inventory with estimates against each item and move items into a Todo Today heading each day as I progress through them. The approach is based on the Pomodoro approach suggested in this book: http://pragprog.com/book/snfocus/pomodoro-technique-illustrated. My problem is, as I plan to do a lot of refiling, I wanted to write a function that will take a heading regular expression and refile the subtree at point underneath it. I am finding this to be difficult, and am wondering if anybody can offer me any advice? Is it even possible to refile a subtree to a point using Emacs Lisp? I've posted my code here: https://gist.github.com/mowen/5225169 My approach uses the org-cut-subtree and org-paste-subtree functions, but it doesn't work in all situations. You can see this from the org-pomodoro-refile-up test which is currently failing. Thanks in advance, Martin --047d7b34335c27ee8104d90fb92b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

I am writing a Pomodoro minor = mode on top of org-mode. I'm planning to maintain
an Activity= Inventory with estimates against each item and move items into a
Todo Today heading each day as I progress through them. The approach is bas= ed on
the Pomodoro approach suggested in this book:

My problem is, as I plan to do a lot of refiling, I wan= ted to write a function
that will take a heading regular expressi= on and refile the subtree at point underneath
it. I am finding th= is to be difficult, and am wondering if anybody can offer me
any advice? Is it even possible to refile a subtree to a point using E= macs Lisp?

I've posted my code here: https://gist.g= ithub.com/mowen/5225169=A0My approach uses the org-cut-subtree and org-= paste-subtree functions, but it doesn't work in all situations. You can= see this from the org-pomodoro-refile-up test which is currently failing.<= /div>

Thanks in advance,

Martin=A0
--047d7b34335c27ee8104d90fb92b-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Advice on writing a refile to heading function? Date: Fri, 29 Mar 2013 09:45:10 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d042ef6616cf0c204d911512f Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULaYL-00048D-VD for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 10:45:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULaYK-0005hR-7H for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 10:45:13 -0400 Received: from mail-la0-x22b.google.com ([2a00:1450:4010:c03::22b]:58030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULaYJ-0005hJ-Tg for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 10:45:12 -0400 Received: by mail-la0-f43.google.com with SMTP id ek20so594330lab.30 for ; Fri, 29 Mar 2013 07:45:10 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Martin Owen Cc: emacs-orgmode --f46d042ef6616cf0c204d911512f Content-Type: text/plain; charset=UTF-8 On Fri, Mar 29, 2013 at 7:51 AM, Martin Owen wrote: > Hi, > > I am writing a Pomodoro minor mode on top of org-mode. I'm planning to > maintain > an Activity Inventory with estimates against each item and move items into > a > Todo Today heading each day as I progress through them. The approach is > based on > the Pomodoro approach suggested in this book: > http://pragprog.com/book/snfocus/pomodoro-technique-illustrated. > > My problem is, as I plan to do a lot of refiling, I wanted to write a > function > that will take a heading regular expression and refile the subtree at > point underneath > it. I am finding this to be difficult, and am wondering if anybody can > offer me > any advice? Is it even possible to refile a subtree to a point using Emacs > Lisp? > > Based on your example file, you're trying to refile "Todo Today" items into a date tree of sorts below for progress tracking? Is that the gist? Just want to make sure I (and the list) understand what you're trying to move and to where (i.e. elaborate on "point underneath it"). Thanks! John > I've posted my code here: https://gist.github.com/mowen/5225169 My > approach uses the org-cut-subtree and org-paste-subtree functions, but it > doesn't work in all situations. You can see this from the > org-pomodoro-refile-up test which is currently failing. > > Thanks in advance, > > Martin > --f46d042ef6616cf0c204d911512f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Fri, Mar 29, 2013 at 7:51 AM, Martin Owen <martin= owenuk@gmail.com> wrote:
Hi,

I am writing a Pomodoro minor mode on top of org-mode. I'm planning to= maintain
an Activity Inventory with estimates against each item and move items = into a
Todo Today heading each day as I progress through them. The approach is bas= ed on
the Pomodoro approach suggested in this book:

My problem is, as I plan to do a lot of refiling, I wan= ted to write a function
that will take a heading regular expressi= on and refile the subtree at point underneath
it. I am finding th= is to be difficult, and am wondering if anybody can offer me
any advice? Is it even possible to refile a subtree to a point using E= macs Lisp?


Based on your example file, you're trying to refile "Todo T= oday" items into a date tree of sorts below for progress tracking? Is = that the gist? Just want to make sure I (and the list) understand what you&= #39;re trying to move and to where (i.e. elaborate on "point underneat= h it").


Thanks!
John
=C2=A0
I've posted my code here: https://gist.github.com/mowen/522516= 9=C2=A0My approach uses the org-cut-subtree and org-paste-subtree funct= ions, but it doesn't work in all situations. You can see this from the = org-pomodoro-refile-up test which is currently failing.

Thanks in advance,

Martin=C2= =A0

--f46d042ef6616cf0c204d911512f-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Owen Subject: Re: Advice on writing a refile to heading function? Date: Fri, 29 Mar 2013 23:01:32 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b3a85c88d354004d91840db Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULiIi-0006Ju-UE for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 19:01:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULiIf-0002Y0-O2 for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 19:01:36 -0400 Received: from mail-la0-x233.google.com ([2a00:1450:4010:c03::233]:57500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULiIf-0002Xk-CK for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 19:01:33 -0400 Received: by mail-la0-f51.google.com with SMTP id fo13so829565lab.38 for ; Fri, 29 Mar 2013 16:01:32 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Hendy Cc: emacs-orgmode --047d7b3a85c88d354004d91840db Content-Type: text/plain; charset=ISO-8859-1 On 29 March 2013 14:45, John Hendy wrote: > On Fri, Mar 29, 2013 at 7:51 AM, Martin Owen wrote: > >> Hi, >> >> I am writing a Pomodoro minor mode on top of org-mode. I'm planning to >> maintain >> an Activity Inventory with estimates against each item and move items >> into a >> Todo Today heading each day as I progress through them. The approach is >> based on >> the Pomodoro approach suggested in this book: >> http://pragprog.com/book/snfocus/pomodoro-technique-illustrated. >> >> My problem is, as I plan to do a lot of refiling, I wanted to write a >> function >> that will take a heading regular expression and refile the subtree at >> point underneath >> it. I am finding this to be difficult, and am wondering if anybody can >> offer me >> any advice? Is it even possible to refile a subtree to a point using >> Emacs Lisp? >> >> > Based on your example file, you're trying to refile "Todo Today" items > into a date tree of sorts below for progress tracking? Is that the gist? > Just want to make sure I (and the list) understand what you're trying to > move and to where (i.e. elaborate on "point underneath it"). > > > Thanks! > John > > >> I've posted my code here: https://gist.github.com/mowen/5225169 My >> approach uses the org-cut-subtree and org-paste-subtree functions, but it >> doesn't work in all situations. You can see this from the >> org-pomodoro-refile-up test which is currently failing. >> >> Thanks in advance, >> >> Martin >> > > Hi John, I'd like a function that takes an arbitrary regexp that matches a heading in the current org-mode buffer, and the subtree at point will then be moved to the level underneath that heading. So I'll have a number of headings "Current Task", "Todo Today", "Activity Inventory", and various date headings. I'd like to be able to move subtrees between those headings with Emacs Lisp code. I'm wondering if someone has suggestions on how to do this, or if it is even possible? I've tried a few things but can't seem to get it to work consistently. Thanks, Martin --047d7b3a85c88d354004d91840db Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 29 March 2013 14:45, John Hendy <<= a href=3D"mailto:jw.hendy@gmail.com" target=3D"_blank">jw.hendy@gmail.com> wrote:
On Fri, Mar 29, 2013 at 7:51 AM, Martin = Owen <martinowenuk@gmail.com> wrote:
Hi,

I am writing a Pomodoro minor mode on top of org-mode. I'm planning to= maintain
an Activity Inventory with estimates against each item and move items = into a
Todo Today heading each day as I progress through them. The approach is bas= ed on
the Pomodoro approach suggested in this book:

My problem is, as I plan to do a lot of refiling, I wan= ted to write a function
that will take a heading regular expressi= on and refile the subtree at point underneath
it. I am finding th= is to be difficult, and am wondering if anybody can offer me
any advice? Is it even possible to refile a subtree to a point using E= macs Lisp?


Based on your example file, you're trying to refile "Todo T= oday" items into a date tree of sorts below for progress tracking? Is = that the gist? Just want to make sure I (and the list) understand what you&= #39;re trying to move and to where (i.e. elaborate on "point underneat= h it").


Thanks!
John
=A0=
I've posted my code here: https://gist.github.com/mowen/522516= 9=A0My approach uses the org-cut-subtree and org-paste-subtree function= s, but it doesn't work in all situations. You can see this from the org= -pomodoro-refile-up test which is currently failing.

Thanks in advance,

Martin=A0


Hi John,=A0

I'd like a function that takes an arbitrary regexp that matches a = heading in the current org-mode buffer, and the subtree at point will then = be moved to the level underneath that heading. So I'll have a number of= headings "Current Task", "Todo Today", "Activity = Inventory", and various date headings. I'd like to be able to move= subtrees between those headings with Emacs Lisp code.

I'm wondering if someone has suggestions on how to do this, or if it i= s even possible? I've tried a few things but can't seem to get it t= o work consistently.

Thanks,

Martin
--047d7b3a85c88d354004d91840db--