emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: add a whole directory as one item to refile targets


From: Sebastian
Subject: Re: [Orgmode] Re: add a whole directory as one item to refile targets
Date: Sat, 17 Oct 2009 14:59:22 +0200

Am Samstag, den 17.10.2009, 12:58 +0200 schrieb Eraldo Helal:
> Thank you very much for sharing this!
> That seems to be more than what I need.
> 
> A waaay easier solution would be to be able to refile/save a headline
> to a non-predefined target.
> > just like it is the case with "find file"  (C-x C-f)
> in other words: being able to "find a file" to use as refile target
> (if it does not exist > create)
> 
> Wouldn't that be an awesome option?

Yes.
This does so. Note: there's no testing for the '*.org'
extension and writability...



(defun sr-add-file-to-org-refile-targets ( file )
  "Add a single file to org-refile targets. Eventually create it."
  (interactive "FNew refile target: ")
  (when (not (file-exists-p file))
    (access-file file))
  (setq sr-org-refile-targets (append (list file)
sr-org-refile-targets))
  (message "org-refile-targets: \n%s" sr-org-refile-targets))



HTH

   Sebastian





reply via email to

[Prev in Thread] Current Thread [Next in Thread]