emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Confusion about org-refile-targets-verify-function
@ 2016-02-03 11:06 Florian Adamsky
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Adamsky @ 2016-02-03 11:06 UTC (permalink / raw)
  To: emacs-orgmode

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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Confusion about org-refile-targets-verify-function
@ 2016-02-03 13:46 Florian Adamsky
  2016-02-25 13:43 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Adamsky @ 2016-02-03 13:46 UTC (permalink / raw)
  To: emacs-orgmode

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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Confusion about org-refile-targets-verify-function
  2016-02-03 13:46 Confusion about org-refile-targets-verify-function Florian Adamsky
@ 2016-02-25 13:43 ` Nicolas Goaziou
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Goaziou @ 2016-02-25 13:43 UTC (permalink / raw)
  To: Florian Adamsky; +Cc: emacs-orgmode

Hello,

Florian Adamsky <fa-orgmode@haktar.org> writes:

> 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:
>
> (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")))
>
> The org-mode file test.org contains the following content:
>
> #+title: Test Org Mode
> #+STARTUP: hidestars
>
> * Foo
> ** tasks
>
> * Bar
> ** Test
> *** Fnord
> **** tasks
> *** Bla
> **** tasks
>
> * Fnord
> ** Nothing
>
> 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?

Nothing. This was a bug, which is now fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-25 13:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03 13:46 Confusion about org-refile-targets-verify-function Florian Adamsky
2016-02-25 13:43 ` Nicolas Goaziou
  -- strict thread matches above, loose matches on Subject: below --
2016-02-03 11:06 Florian Adamsky

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).