Samuel Wales <samolog...@gmail.com> writes: > Hi Carsten, > > On 2009-08-02, Carsten Dominik <carsten.domi...@gmail.com> wrote: >> If you mark some headlines (for example you remember targets) >> with a tag like "r", you could make yourself a restricted >> refile command like this: >> >> (defun my-org-restricted-refile () >> (interactive) >> (let ((org-refile-targets '((org-agenda-files :tag . "r")))) >> (call-interactively 'org-refile))) >> >> Not what you proposed, but maybe useful.
Sorry, for not following the original thread closely. But the above function does something, I missed when refiling, too. A way to add refile targets on the fly. The refile mechanism depends on agenda files and files below `org-directory' or a somewhat static setup, which is insufficient for most of my use cases. I often take notes for just any of my project using a limited set templates (limited, because I don't want to choose out of many templates for better overview and less thinking while storing via remember). But when it comes to refiling, I need to spread all those notes to several directories, scattered all over the place. I therefor have `org-refile-targets' set to: ((org-agenda-files :maxlevel . 3) (sr-org-refile-targets :maxlevel . 2)) In addition, I use the (far from perfect) functions below. They make it possible, to add any directory to my refile targets on-the-fly, which is what I prefer. `sr-add-to-org-refile-targets' adds all *.org files in a directory to my targets, with a prefix arg (`C-u ....') recursively. Since a big number of refile targets slows down refiling a lot (the only area I ever felt a slow down in Org-mode so far), a function to remove refile targets again (recursively, too) is still missing. Also, a function to add or remove single files is missing.
binDrz0qKjt82.bin
Description: application/emacs-lisp
A good better alternative would be, to allow for refiling to arbitrary Org-files. 1. `M-x org-refile-to' 2. Minibuffer prompt: Find file: ~/ 3. Navigate to an *.org file (restrict TAB completion to *.org) 4. RET 5. Org-mode scanns the file and offers the targets as usual. 6. Add the file to the list of refile targets. Which would mean to add just one simple function to Org-mode. I'd prefer this simple interface over the directory aproach. In emacs, the directory aproach is not needed, since we have the history (UP) for quickly find a second file in the same directory. Please choose the interface you like most, say `yes, we want it', and I'll sit down and hack together a proposal. Sebastian
_______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode