[Top][All Lists]

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

[Orgmode] Interactively add refile targets - was: refile ideas

From: Sebastian Rose
Subject: [Orgmode] Interactively add refile targets - was: refile ideas
Date: Wed, 05 Aug 2009 15:00:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Samuel Wales <address@hidden> writes:
> Hi Carsten,
> On 2009-08-02, Carsten Dominik <address@hidden> 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.

Attachment: binueHGLpUTB7.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.


reply via email to

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