Refile from one file to other

kawu picture kawu · Mar 5, 2014 · Viewed 7.3k times · Source

I'm trying to implement GTD in emacs based on http://members.optusnet.com.au/~charles57/GTD/gtd_workflow.html and I have a problem with refiling.

In the file .emacs I have such a configuration

(setq org-refile-use-outline-path 'file)
'(org-refile-targets (quote (("gtd.org" :maxlevel . 1) ("done.org" :level . 1))))

The sequence Cc Cw can select only the place of the current file:

  • gtd.org/
  • gtd.org/tasks
  • gtd.org/projects

Please help in determining why do not I move to done.org

Regards Krzysiek

Answer

abo-abo picture abo-abo · Mar 5, 2014

Here's a fix of your code:

(setq org-refile-targets
      '(("gtd.org" :maxlevel . 1)
        ("done.org" :maxlevel . 1)))

Here's a setup similar to what I use now:

(setq org-agenda-files
      '("gtd.org" "done.org"))

(setq org-refile-targets
      '((nil :maxlevel . 3)
        (org-agenda-files :maxlevel . 3)))

This first element of org-refile-targets decides the heading levels to consider within current file, the second element - within other agenda files.