How can I change the org-capture templates to dynamically format the file name?
The following example doesn’t work because it will only call the function once - when I evaluate the variable. I need to make it call a function every time I create the template.
The function simply returns the current buffer’s file-name and appends _anki.org to the name.
Is it possible to pass a variable or to get the buffer from where I called org-capture? As you said, the at-point function returns nil. Is it possible to at least get a link to the current buffer?
Does this mean that you can now call a function and confirm that the at-point function didn’t return the node’s filename correctly as you expect it would?
An easy way would be to define a global variable and set it just before calling the capture command. I’d wrap it with a custom function. You could consider advising, too.