emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Eraldo Helal <eraldo@eraldo.at>
Cc: Bernt Hansen <bernt@norang.ca>, Org-Mode <emacs-orgmode@gnu.org>
Subject: Re: add a whole directory as one item to refile targets
Date: Mon, 12 Oct 2009 16:15:32 +0200	[thread overview]
Message-ID: <657EC5D2-50AD-4A3A-B135-F0EC5984614C@gmail.com> (raw)
In-Reply-To: <938fae2d0910120648t5147b4d9y3339d3f06bc732e7@mail.gmail.com>


On Oct 12, 2009, at 3:48 PM, Eraldo Helal wrote:

>> What is Reference/ supposed to be in this case -- a directory?   
>> Refiling
>> only works to headings (or top level headings) in files in org-mode  
>> IIRC.
> Yes it is supposed to be a directory...
>
> I have org files in many directorys... about like so:
> reference/emacs/emacs.org
> reference/eros/eros.org
> reference/Avalon/Avalon.org
> reference/Gimp/Gimp.org
> reference/office/office.org
> reference/home/home.org
> reference/poems/poems.org
> ...
>
> What would be a smart way to get a headline from the file inbox.org
> named "* Erich Fried poems" to poems.org?
> Considering that poems.org is not part of the agenda nor a refile  
> target.

Well, you need to make it a refile target, that is the
whole point of defining refiling targets.

If you want, you can make yourself a special refile function that  
temporarily installs a long list of files in org-refile-targets.  You  
can use `let' to bind
org-refile-targets, and directory-files to get the files.

For example (untested)

(defun my-refile-to-reference ()
   (interactive)
   (let ((org-refile-targets (list (directory-files "~/Reference/  
'full "*.org")
                                   '(:maxlevel . 1))))
      (call-interactively 'org-refile)))

Would offer all top-level headlines in any org files in the ~/ 
Reference directory


HTH

- Carsten

>
> What I am doing until now is:
> folding the headline (tab)
> cutting the headline (C-k)
> making a split screen (C-x 2)
> changing buffer (C-x o)
> opening poems.org (C-x C-f "reference/poems/poems.org")
> pasting headline (C-y)
> changing buffer (C-x o)
> removing split view (C-x 1)
>
> Poems.org is not part of the agenda because it is reference material
> and not an active file.
> It is also not a refile target because I would have to make every .org
> file in all subdirectories a refile target and sometimes the
> appropriate file does not yet exist, in which case I need to create
> it.
>
> Any ideas?
> Do I need to further try to make clear what I mean?
>
> Greetings,
> Eraldo

- Carsten

  reply	other threads:[~2009-10-12 14:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-04 22:30 add a whole directory as one item to refile targets Eraldo Helal
2009-10-08  7:02 ` Carsten Dominik
2009-10-08  8:17   ` Syntax coloring not automatic Helge A. Gudmundsen
2009-10-10 21:48   ` add a whole directory as one item to refile targets Eraldo Helal
2009-10-10 22:06     ` Bernt Hansen
2009-10-12 13:48       ` Eraldo Helal
2009-10-12 14:15         ` Carsten Dominik [this message]
2009-10-17 13:19           ` Eraldo Helal
2009-10-12 16:47         ` Sebastian
2009-10-17 10:58           ` Eraldo Helal
2009-10-17 12:59             ` Sebastian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=657EC5D2-50AD-4A3A-B135-F0EC5984614C@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    --cc=eraldo@eraldo.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).