Closed kasteph closed 3 years ago
It seems that I've managed to fix it. The issue was in my orb-templates
:
(setq orb-templates
'(("r" "ref" plain (function org-roam-capture--get-point)
when it should be:
(setq orb-templates
`(("r" "ref" plain (function org-roam-capture--get-point)
Great! The backquote syntax is Emacs' blessing but easy to overlook.
A few friendly suggestions. You can use template files for larger templates, see the docstring of org-capture-templates
for more information. This may be especially useful for decluttering your init.el
if you have more than one template. In short, it'd look like this:
;; init.el
(setq orb-templates
'(("r" "ref" plain (function org-roam-capture--get-point)
(file "path/to/ref.template")
:file-name "lit/${slug}"
:head "#+title: ${title}\n"
:unnarrowed t)
("q" "another template" (function org-roam-capture--get-point)
(file "path/to/another.template")
...)
Contents of ref.template
#+roam_key: cite:%^{citekey}
* %^{title}
:PROPERTIES:
:AUTHOR: %^{author}
:NOTER_DOCUMENT: %(orb-process-file-field \"%^{=key=}\")
:NOTER_PAGE:
:END:
Note, however, that only Org capture-style wildcards %^{}
will work here.
Also, you can use a special %^{file}
wildcard (or ${file}
outside of a template file) with the same effect as %(orb-process-file-field \"${=key=}\")
, i.e. if more than one file exists for a given entry, you'll be prompted to make a choice. The "file" keyword as well as the "=key=" keyword should be added to orb-preformat-keywords
, if you plan to use them, though.
@myshevchuk Thanks so much for taking the effort to follow up 🙏🏽 These are really helpful tips for an Emacs newbie like me :)
I'm having the exact same problem. Changing from a ' to a ` while defining the orb-templates variable doesn't help.
@mbosley this means that the cause of your problem is different.
Describe the bug
orb-insert
does not create a new note when one does not exist already.To Reproduce Steps to reproduce the behavior:
.bib
file set withbibtex-completion-library
.C-c ) i
(orM-x
then selectingorb-insert
).Expected behavior Mini-buffer (? not sure of the right term, just started using emacs 😅 ) to capture note should show up.
ORB configuration
orb-templates
)Environment (please complete the following information):
9ba1506
15d864a
Screenshots