Hey,

I'm using Emacs 24.5.1 and Org-mode 8.3.3 (15d591e) and try to filter
the output of my refile targets. For me, every headline that contains a
subtree with the name "tasks" is a project. Therefore, I would to filter
my refile targets to those which contains the name "tasks".

I use emacs -q and have the following configuration:

--8<---------------cut here---------------start------------->8---
(setq org-agenda-files (list "~/test.org" ))

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

(setq org-refile-use-outline-path t)

(setq org-refile-target-verify-function (lambda ()
    (string= (nth 4 (org-heading-components)) "tasks")))
--8<---------------cut here---------------end--------------->8---

The org-mode file test.org contains the following content:

--8<---------------cut here---------------start------------->8---
#+title: Test Org Mode
#+STARTUP: hidestars

* Foo
** tasks

* Bar
** Test
*** Fnord
**** tasks
*** Bla
**** tasks

* Fnord
** Nothing
--8<---------------cut here---------------end--------------->8---

The output from org-refile is:
  - tasks (test.org)
  - tasks/tasks (test.org)

I had expected that the output will be:
  - Foo/tasks
  - Bar/Test/Fnord/tasks
  - Bar/Test/Bla/tasks

What am I doing wrong? Thanks in advance!

Best regards
--
Florian Adamsky
http://florian.adamsky.it/

Reply via email to