Loading all org files on a folder to agenda
I found an org tutorial where it is explained how to load org files from a folder, using
(setq org-agenda-files (list "~/org/work.org"
"~/org/school.org"
"~/org/home.org"))
Question
Is there a way to tell emacs to load all the org files on a given folder to the agenda?
Inspired on the answer given by Aaron, I change my configuration to
(setq org-agenda-files (list "~/org"))
and the problem was solved.
Using the Org mode included with Emacs 24.3, from C-h v org-agenda-files RET
:
If an entry is a directory, all files in that directory that are matched by
`org-agenda-file-regexp' will be part of the file list.
And from C-h v org-agenda-file-regexp RET
:
org-agenda-file-regexp is a variable defined in 'org.el'.
Its value is "\\`[^.].*\\.org\\'"
[...]
You can customize this variable.
So, in short: evaluate (add-to-list 'org-agenda-files (expand-file-name "~/org"))
and, if your org-agenda-file-regexp
is at the default value, Org mode will read agenda items from any file in ~/org
whose name ends in .org
. (If your org-agenda-file-regexp
isn't at the default value, or if you need it to match more than just files whose names end in .org
, then customize it to your needs via M-x customize-variable RET org-agenda-file-regexp RET
.)