Use variable or function for target org file
Closed this issue · 2 comments
dakra commented
I try to use a variable or a function to specify
the org file target but it seems to be only working with a string?
(setq orca-handler-list
'((orca-handler-match-url
"https://www.reddit.com/r/emacs"
(concat org-directory "refile.org") "\\* Reddit") ;; Doesn't work
(orca-handler-match-url
"https://emacs.stackexchange.com/"
org-default-notes-file "\\* Questions") ;; Doesn't work
(orca-handler-file
"~/org/refile.org" "\\* Refile"))) ;; Works
In the message buffer I get
Greedy org-protocol handler. Killing client.
Thanks.
abo-abo commented
It only works with a string, but you can have your config work by using quasi-quote:
(setq orca-handler-list
`((orca-handler-match-url
"https://www.reddit.com/r/emacs"
,(concat org-directory "refile.org") "\\* Reddit")
(orca-handler-match-url
"https://emacs.stackexchange.com/"
,org-default-notes-file "\\* Questions")
(orca-handler-file
"~/org/refile.org" "\\* Refile")))
dakra commented
Great. Thank you very much.
Now looking at it I see that your solution is also the way I define org-capture-templates
already so should have figured it out myself.