From mboxrd@z Thu Jan 1 00:00:00 1970 From: david@adboyd.com (J. David Boyd) Subject: Re: How to let Org Agenda search all files in a directory *recursively* ? Date: Thu, 27 Jun 2013 17:22:39 -0400 Message-ID: References: <20130627075135.GA4761@stardiviner> <87li5vbp50.fsf@yahoo.fr> <87fvw3bcm0.fsf@yahoo.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsJea-0001Je-Rl for emacs-orgmode@gnu.org; Thu, 27 Jun 2013 17:22:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsJeZ-0007Z3-Rk for emacs-orgmode@gnu.org; Thu, 27 Jun 2013 17:22:56 -0400 Received: from plane.gmane.org ([80.91.229.3]:43782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsJeZ-0007Yw-Lh for emacs-orgmode@gnu.org; Thu, 27 Jun 2013 17:22:55 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UsJeT-0005bU-H8 for emacs-orgmode@gnu.org; Thu, 27 Jun 2013 23:22:49 +0200 Received: from 169.15.137.27 ([169.15.137.27]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Jun 2013 23:22:49 +0200 Received: from david by 169.15.137.27 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Jun 2013 23:22:49 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nicolas Richard writes: > david@adboyd.com (J. David Boyd) writes: >> 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. > > It's what happens for me too, but I specifically wrote some elisp to do > that in my .emacs. Can you reproduce from -Q ? emacs -Q didn't work at all, so I went digging into my config file. Here's what recursively loads .org files for me. I don't remember when I added this, but it's been a while... In my emacs-init.org file, I have: (add-hook 'org-agenda-mode-hook (lambda () (setq org-agenda-files (find-lisp-find-files "~/org" "\.org$") ) ) ) So no matter what I might type into the org-agenda-files in customize, this is what really runs. And it works fine too. I think I got this code from Sacha Chua, but I'm not certain. Dave