Ok, at long last, I have found a solution.
First of all, org-agenda-files
is a variable that contains a list of 1 or more files and directories where org-mode files can be found. In the case of a single file, that contains a line-by-line list of all the org-mode files. In the case of any number of directories, it expands the list, finding all files that match org-agenda-file-pattern
in each directory.
Now, org-agenda-files
is a function that does the aforementioned file expansion. You read that right. It's both a variable and a function.
The issue I was having, is that variables set with customize, don't become set until (I think) during the after-init-hook
which is after running your init file. Since my init file was trying to add-to-list to a variable that hadn't yet been set, it was failing or being overwritten by the customize stuff.
My solution:
(defun add-orgjira-dir ()
"Add .org-jira to orgmode"
(add-to-list 'org-agenda-files "~/.org-jira/"))
(add-hook 'after-init-hook 'add-orgjira-dir 1)