From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Adamsky Subject: Confusion about org-refile-targets-verify-function Date: Wed, 03 Feb 2016 14:46:52 +0100 Message-ID: <87vb65gb5b.fsf@haktar.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQxlq-0004x2-Gk for emacs-orgmode@gnu.org; Wed, 03 Feb 2016 08:46:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQxlm-0005Ed-9N for emacs-orgmode@gnu.org; Wed, 03 Feb 2016 08:46:58 -0500 Received: from haktar.org ([46.38.251.222]:54756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQxlm-0005Dy-3L for emacs-orgmode@gnu.org; Wed, 03 Feb 2016 08:46:54 -0500 Received: from localhost (p57926F46.dip0.t-ipconnect.de [87.146.111.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cit) by haktar.org (Postfix) with ESMTPSA id A746D1A5A83 for ; Wed, 3 Feb 2016 14:46:52 +0100 (CET) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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/