emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Refile] Make agenda-files and current file targets
@ 2013-10-30 12:44 Alexander Baier
  2013-10-30 16:44 ` Alexander Baier
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Baier @ 2013-10-30 12:44 UTC (permalink / raw)
  To: emacs-orgmode

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

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

end of thread, other threads:[~2013-10-30 16:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-30 12:44 [Refile] Make agenda-files and current file targets Alexander Baier
2013-10-30 16:44 ` Alexander Baier

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).