emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Martin Owen <martinowenuk@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Advice on writing a refile to heading function?
Date: Fri, 29 Mar 2013 12:51:00 +0000	[thread overview]
Message-ID: <CADrADkkszhO-3nxq8fp9ZYfd-o3-UNw4bYaLaaFjGps2XkPW2g@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 966 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1398 bytes --]

             reply	other threads:[~2013-03-29 12:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-29 12:51 Martin Owen [this message]
2013-03-29 14:45 ` Advice on writing a refile to heading function? John Hendy
2013-03-29 23:01   ` Martin Owen

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=CADrADkkszhO-3nxq8fp9ZYfd-o3-UNw4bYaLaaFjGps2XkPW2g@mail.gmail.com \
    --to=martinowenuk@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 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).