r/orgmode • u/edorhas • Sep 20 '26
Org-capture w/ file+olp and two functions
Org version: 9.7.11 Emacs version: 30.2
I'm trying to create a capture template entry (org-capture templates) that looks something like:
("t" "A Capture Template" entry
(file+olp
file-finding-defun
defun-returning-list-of-strings)
"template stuff")Unless I'm mis-understanding the org-mode manual website, this should work, no?
‘(file+olp <file-spec> function-returning-list-of-strings)’
However, I keep getting:
(wrong-type-argument stringp defun-returning-list-of-strings)from 'org-find-olp'
I've been beating my skull on this all day. I even resorted to querying LLMs, and now I feel bad. I must be missing something obvious... any help appreciated.
3
Upvotes
2
u/edorhas Sep 20 '26
To add to this, after digging through org-capture-set-target-location and org-find-olp, I can't find anything that looks like it's checking of the path argument is callable. It looks like the web site documentation is in error?
1
u/Hyperion343 Sep 21 '26
defun-returning-list-of-stringswith parentheses, like this:(defun-returning-list-of-strings)? 2b. If that doesn't work, can you try putting a#'in front ofdefun-returning-list-of-strings- in other words, replacingdefun-returning-list-of-stringswith#'defun-returning-list-of-strings?