Jack Baty
Director of Unspecified Services
Skip to main content

Using :tag for org-refile-targets in Emacs

Today I learned that I can use tags in Org files as a filter for org-refile-targets. I have my refile targets map to org-agenda-files but limit them to only top-level headings in order to keep the list under control. Once in a while, though, I would like to make a more deeply nested heading available for refiling. I can do this by using (:tag . "refile"). Who knew?!

(setq org-refile-targets '((org-agenda-files :maxlevel . 1)
(org-agenda-files :tag . "refile")))

(h/t Marcin ‘mbork’ Borkowski)