From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eraldo Helal Subject: Re: add a whole directory as one item to refile targets Date: Sat, 17 Oct 2009 15:19:22 +0200 Message-ID: <938fae2d0910170619v3546a6aajc9cdee143b641b7a@mail.gmail.com> References: <938fae2d0910041530v51cdaac4jb8db88b6cb1a8b56@mail.gmail.com> <938fae2d0910101448j2c39d67aw4950c7899c3307a1@mail.gmail.com> <87ocoeq4xw.fsf@gollum.intra.norang.ca> <938fae2d0910120648t5147b4d9y3339d3f06bc732e7@mail.gmail.com> <657EC5D2-50AD-4A3A-B135-F0EC5984614C@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mz9CG-00046P-UU for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 09:19:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mz9CC-00041h-7c for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 09:19:48 -0400 Received: from [199.232.76.173] (port=53655 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mz9CC-00041W-2i for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 09:19:44 -0400 Received: from mail-ew0-f228.google.com ([209.85.219.228]:39854) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mz9CB-0006c7-Q8 for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 09:19:43 -0400 Received: by ewy28 with SMTP id 28so2921174ewy.42 for ; Sat, 17 Oct 2009 06:19:42 -0700 (PDT) In-Reply-To: <657EC5D2-50AD-4A3A-B135-F0EC5984614C@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: Bernt Hansen , Org-Mode > For example (untested) > > (defun my-refile-to-reference () > =C2=A0(interactive) > =C2=A0(let ((org-refile-targets (list (directory-files "~/Reference/ 'ful= l > "*.org") > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'(:maxlevel . 1)))) > =C2=A0 =C2=A0 (call-interactively 'org-refile))) > > Would offer all top-level headlines in any org files in the ~/Reference > directory "directory-files" only outputs directories but no .org files therefore with the pattern "*.org" as a filter ... nothing is returned! But I like the idea a lot! Should "directory-files" list all files inside a directory? Greetings, Eraldo