emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Fast traversing directories
Date: Sat, 31 Oct 2009 20:16:23 +0100	[thread overview]
Message-ID: <87k4ybqsqg.fsf@tux.homenetwork> (raw)
In-Reply-To: 11278.1257013690@gamaville.dokosmarshall.org

Hi,
if you have traverselisp.el, you can use:

,----
| (dolist (d org-directories)
|   (traverse-walk-directory d :file-fn #'(lambda (x)
|                                           (when (string= (file-name-extension x) "org")
|                                             (push x org-agenda-files)))))
`----

you can get traverselisp.el here:
http://www.emacswiki.org/cgi-bin/emacs/traverselisp.el

or here: (hg clone)
http://mercurial.intuxication.org/hg/traverselisp

Nick Dokos <nicholas.dokos@hp.com> writes:

> andrea Crotti <andrea.crotti.0@gmail.com> wrote:
>
>> 
>> I tried this because I have more base directories.
>> (setq org-directories '("~/org" "~/uni"))
>> (setq org-agenda-files ())
>> (dolist ((d org-directories))
>>   (setq org-agenda-files
>> 	(append org-agenda-files (find-lisp-find-files d "\.org$"))))
>> 
>> 
>> But it sets org-agenda-files to nil...
>
> Too many parens: try
>
> (dolist (d org-directories)
>    (setq org-agenda-files
>  	(append org-agenda-files (find-lisp-find-files d "\.org$"))))
>
> Nick
>
>
>
> _______________________________________________
> 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
>

-- 
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France

  reply	other threads:[~2009-10-31 19:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-31 17:07 Fast traversing directories andrea Crotti
2009-10-31 17:15 ` Benjamin Andresen
2009-10-31 17:31   ` andrea Crotti
2009-10-31 18:09     ` PT
2009-10-31 18:28     ` Nick Dokos
2009-10-31 19:16       ` Thierry Volpiatto [this message]
2009-11-20 20:43         ` Tim O'Callaghan

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=87k4ybqsqg.fsf@tux.homenetwork \
    --to=thierry.volpiatto@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).