Nicolas Richard <theonewiththeevill...@yahoo.fr> writes:

> da...@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


Reply via email to