all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
To: Emacs Org-mode <emacs-orgmode@gnu.org>
Subject: Re: How to let Org Agenda search all files in a directory *recursively* ?
Date: Thu, 27 Jun 2013 16:32:27 +0200	[thread overview]
Message-ID: <87li5vbp50.fsf@yahoo.fr> (raw)
In-Reply-To: <20130627075135.GA4761@stardiviner> (chris's message of "Thu, 27 Jun 2013 15:53:53 +0800")

chris <numbchild@gmail.com> writes:

> How to Let [C-c a] to search over all files in a directory *recursively* ?

AFAIK, there's no built in way.

Applying the following patch to the function org-agenda-files gets you
there, but it's not clean at all, and certainly very unefficient :

	Modified   lisp/org.el
diff --git a/lisp/org.el b/lisp/org.el
index 7fd1576..0068c49 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17797,8 +17797,7 @@ used by the agenda files.  If ARCHIVE is `ifmode', do this only if
     (setq files (apply 'append
 		       (mapcar (lambda (f)
 				 (if (file-directory-p f)
-				     (directory-files
-				      f t org-agenda-file-regexp)
+				     (find-lisp-find-files f org-agenda-file-regexp)
 				   (list f)))
 			       files)))
     (when org-agenda-skip-unavailable-files

Also it might be faster to rely on an external "find" tool but that requires
modifying the regexp (-regex applies to whole path).

HTH,

-- 
N.

  parent reply	other threads:[~2013-06-27 14:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27  7:53 How to let Org Agenda search all files in a directory *recursively* ? chris
2013-06-27 13:20 ` J. David Boyd
2013-06-27 13:57   ` Nick Dokos
2013-06-27 14:32 ` Nicolas Richard [this message]
2013-06-27 17:53   ` J. David Boyd
2013-06-27 19:03     ` Nicolas Richard
2013-06-27 21:22       ` J. David Boyd
2013-06-27 23:40 ` Suvayu Ali

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

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

  git send-email \
    --in-reply-to=87li5vbp50.fsf@yahoo.fr \
    --to=theonewiththeevillook@yahoo.fr \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.