I\'ve seen this:
How to type a dynamic file entry for org capture
but cannot get it to work; I get \"Invalid file location: nil\". Has something changed in
It seems like something has changed between Org-mode 8.2.10 and 9.1.9 specifically in the way Org handles template elements. Whereas in earlier version of Org the second value in the pair (file ...) could be a function that Org would evaluate, now it seems only a string (file path) is valid here.
The fix is to use the backquote list form, and explicitly state that the function needs evaluating using the comma:
(setq org-capture-templates `(
;; ...
("j" "Journal Note"
entry (file ,(get-journal-file-today))
"* Event: %?\n\n %i\n\n From: %a"
:empty-lines 1)
;; ..
))