Hello,
I am trying to configure my refiling targets in a way, that allows me to
refile to any of the files in org-agenda-files, as well as to the file
displayed by the current buffer, if it is not included in
org-agenda-files. Additionally, I want the headings in agenda-files to
be included up to level 4, but of current file every heading should be
considered a target.
This is what I came up with so far:
----------------------------------------------------------------
(setq org-refile-targets
(quote ((org-agenda-files :maxlevel . 4)
(#'(lambda ()
(unless (member (buffer-file-name) org-agenda-files)
(buffer-file-name)) :regexp . ".*")))))
----------------------------------------------------------------
The problem here is, that the lambda evaluates to nil when
(buffer-file-name) is a member of org-agenda-files. And this nil in turn
isn't anything org-refile understands (Upon C-c C-w I get "Bad refiling
target description nil").
Does anyone know how to go about this and can give me soem pointers?
Regards,
Alex