From: david@adboyd.com (J. David Boyd)
To: emacs-orgmode@gnu.org
Subject: Re: How to let Org Agenda search all files in a directory *recursively* ?
Date: Thu, 27 Jun 2013 13:53:48 -0400 [thread overview]
Message-ID: <m9hi8v1v8moj.fsf@W0144758.usac.mmm.com> (raw)
In-Reply-To: 87li5vbp50.fsf@yahoo.fr
Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:
> 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,
Huh, when I set my org-agenda-files to ~/org/, and have TODO files in
~/org/home and ~/org/work, and press C-c a a, it loads all the todo file,
recursed down to all the subdirectories.
However, and this is strange, after it loads them all up, it changes
org-agenda-files to discrete filepaths, and not just the directory anymore.
That seems like a bug to me....
Dave
next prev parent reply other threads:[~2013-06-27 17:55 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
2013-06-27 17:53 ` J. David Boyd [this message]
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
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=m9hi8v1v8moj.fsf@W0144758.usac.mmm.com \
--to=david@adboyd.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).