Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs org mode refile to main tree and not as a subtree

Tags:

emacs

org-mode

I have two files and I have set it up so that i can refile any of the items from refile.org and into todo.org.

File 1- refile.org
* TODO Task 1
* TODO Task 2
* TODO Task 3
* TODO Task 4
etc


File 2- todo.org
* TODO Task 5
** TODO Task 1

The only thing is that I can only refile it as a subtree of Task 5 and not as its own tree. Am i missing something or is there a way to do this so that i can get:

    File 1- refile.org
* TODO Task 1
* TODO Task 2
* TODO Task 3
* TODO Task 4
etc


File 2- todo.org
* TODO Task 5
* TODO Task 1

Thanks

like image 975
Nathaniel Saxe Avatar asked Jan 24 '14 14:01

Nathaniel Saxe


1 Answers

If you specify org-refile-use-outline-path to be 'file it is possible to just use the path of the file as the refile target and the node will be entered at the top-level.

(setq org-refile-use-outline-path 'file)
(setq org-refile-targets '((org-agenda-files :level . 1)))

You can see the full documentation of org-refile-use-outline-path with C-h v org-refile-use-outline-path RET.

like image 80
pmr Avatar answered Nov 15 '22 20:11

pmr