Reputation: 91
I am trying to use the refile function but don't understand why I get the error
no refile targets
after hitting the Cc Cw key.
Here is the content of org-refile-targets
variable :
Its value is (("~/gtd/gtd.org" :maxlevel . 3) ("~/gtd/someday.org" :level . 1) ("~/gtd/tickler.org" :maxlevel . 2))
Original value was nil and defined through this function in .emacs
(setq org-refile-targets '(("~/gtd/gtd.org" :maxlevel . 3)
("~/gtd/someday.org" :level . 1)
("~/gtd/tickler.org" :maxlevel . 2)))
All those files exist in the gtd folder. I can capture elements that I are stored into the ~/gtd/inbox.org
file.
I am relatively new to the emacs/org-mode world, the error might be quite stupid.
Upvotes: 8
Views: 3519
Reputation: 960
I had a similar problem which I managed to solve after reading this, so I thought I'd add that solution as well in case it helps others.
I'm currently, through no fault of my own, using Windows. Therefore, I had my paths in my org-refile-targets
set up like this:
"C:\Path\to\orgfile.org"
I wasn't thinking properly - those backslashes are interpreted. So the solution was to switch from backslashes to slashes (which works in Emacs even in Windows):
"C:/Path/to/orgfile.org"
I'm guessing that double backslashes would also have worked.
Upvotes: 0
Reputation: 111
It seems like you're following along with Nicolas Petton's Orgmode for GTD article; I ran into the same issue this morning.
org-refile
searches for headings within the files in org-refile-targets
, up to the level specified. So in your example, org-refile
will find headings up to level 3 in ~/gtd/gtd.org
, level 2 in ~/gtd/tickler.org
, and only level 1 in ~/gtd/someday.org
. These will then be offered as targets for your refile operation.
To fix this error, simply create some headings in one or more of those files.
Upvotes: 11