[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [Refile] Make agenda-files and current file targets
From: |
Alexander Baier |
Subject: |
[O] [Refile] Make agenda-files and current file targets |
Date: |
Wed, 30 Oct 2013 13:44:05 +0100 |
User-agent: |
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux) |
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
- [O] [Refile] Make agenda-files and current file targets,
Alexander Baier <=