Struggling getting the org-capture-template
property :refile-targets
working in Emacs orgmode. I’ve tried various options to make this function as I want, which is to be able to have targets for a capture template generated based on the file naming scheme. I use Denote filetags for my current term class’s files, in this instance fa24.
(setq org-capture-templates
(seq-uniq
(append
'(
("c" "Class notes" entry (file+headline org-default-notes-file "Class")
"* %U\n\n** Lecture Notes\n\n** Assignments\n\n** Required Reading\n\n"
:prepend t
:jump-to-captured t
:empty-lines 1
:refile-targets ((directory-files "~/org/" t "fa24") :maxlevel . 1))
)
)
)
)
※ The following is also in my config and works fine:
(setq org-refile-targets '((org-agenda-files :maxlevel . 1)))
(setq org-agenda-files (append
(list
"~/org/calendar-beorg.org"
"~/org/refile.org"
"~/org/orgzly.org"
"~/org/inbox.org"
"~/org/20240512T145547--habits.org"
)
(directory-files "~/org/" t "fa24" t)
)
Dear Social web, any suggestions?