Emacs org mode refile for the main tree, not as a subtree

I have two files, and I configured them so that I can recover any elements from refile.org and 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 I can only restore it is as a subtree of Task 5, and not as my own tree. I missed 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

+7
emacs org-mode
source share
2 answers

If you specify org-refile-use-outline-path as 'file , you can simply use the file path as the target of the refix, and 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 view the full org-refile-use-outline-path documentation with Ch v org-refile-use-outline-path RET .

+7
source share

If you want to use Ido completion, you can change org-outline-path-complete-in-steps . My settings include

 (setq org-refile-use-outline-path 'file) (setq org-refile-targets `( ( ,(append org-agenda-files (list tech)) :regexp . "refile") ( ,(append org-agenda-files (list tech)) :maxlevel . 1) )) (setq org-completion-use-ido t) (setq org-outline-path-complete-in-steps nil) (setq org-reverse-note-order t) 

Right after Cc Cw I can only see file names. But if I go over, subtrees of level one will appear. I haven't made any subtrees of the subtree yet, but hopefully the first description of the target will behave nicely.

I also have a reverse order-note, so that new items will not be lost at the bottom of the target.

The tech variable expands wherever I want to save it. I do not want to put this in my org-agenda-files , this is something that I really do not need to do, but I want it to be referenced.

+2
source share

All Articles