I am facing the following problem: Org mode has the customizable variable org-agenda-files
. The files listed by absolute path under this variable are used for building the org agenda window. If an element in the list is a directory, then all .org
files matching the org-agenda-regex
are processed to build the agenda view. On the other hand there is also another customizable variable: org-directory
. Shockingly though, if org-agenda-files
is undefined, the agenda view does not try to use the matching .org
files under org-directory
. Also, listing the paths of the agenda files relative to org-directory
in org-agenda-files
is not accepted, as it complains that the files are not found.
My question is, is there an reasonably elegant way to make use of the org-directory
in the lookup of agenda files, either by using it as the default to look for all .org files, or to describe the agenda files list with relative paths to org-directory
?
To enable Org mode on your current document, type M-x org-mode which will enable the Org mode on the current document. Those are minuses, not underscores. MY PROJECT is the title of the document, this can be anything. This will enable Org mode for this document, no matter what the file-ending is.
So, let's mark the TODO item DONE by moving the cursor onto that line and hitting C-c C-t, which runs the command org-todo. Notice how org-mode uses a timestamp to record when a TODO item was closed. Let's add some more TODO items.
Actually just managed to get it working the way I wanted. So this is how the relevant config code should look like:
(custom-set-variables
'(org-directory "~/Documents/org")
'(org-agenda-files (list org-directory)))
This way the agenda reads from all .org
files under the org-directory
, and when org-directory
changes it follows it. Just what I was looking for ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With