I am trying to set up Org-roam-bibtex to be able to create notes out of bibliographic references and I have encountered a problem with orb-insert.
Whenever I try to use it with any citation I get an error that reads cite:foo is not a valid ref
The configuration I set for the org-roam directory and my bibliography folder are these.
(setq org-roam-directory “~/org_roam”)
(setq bibtex-completion-bibliography
'("~/org_roam/Zotero_library.bib"))
(setq reftex-default-bibliography '("~/org_roam/Zotero_library.bib"))
Originally, I tried this and it worked fine. Then I tried adding some things to the capture template to make it work with org-noter as described in the github page. You can see the relevant code below
(setq orb-preformat-keywords
'(“citekey” “title” “url” “author-or-editor” “keywords” “file”)
orb-process-file-keyword t
orb-file-field-extensions '(“pdf”))
(setq orb-templates
'((“r” “ref” plain (function org-roam-capture–get-point)
“”
:file-name "{citekey}"
:head "#+TITLE: {citekey}: {title}\n#+ROAM_KEY: {ref}
- tags ::
- keywords :: ${keywords}
-
{title}
:PROPERTIES:
:Custom_ID: {citekey}
:URL: {url} :AUTHOR: {author-or-editor}
:NOTER_DOCUMENT: ${file} ; <== special file keyword: if more than one filename
:NOTER_PAGE: ; is available, the user will be prompted to choose
")))
I try this and it worked. Then I tried adding an abstract to it as well and to my surprise I did it correctly as well. Then I try to do it in another file as well for more testing. And thats where this error hit.
From that point on, I tried removing all relevant configuration and going with the default template, I tried reinstalling the package, deleting the entry that worked (it was for testing purposes anyway) and trying it again but everything fails. I am lost at what I am actually supposed to do at this point.
Here is the final config (although it doesnt really matter, I get the same error regardless of if it is in the file or not)
(setq bibtex-completion-additional-search-fields '(keywords))
(setq orb-preformat-keywords
'("citekey" "title" "url" "author" "keywords" "file" "abstract")
orb-process-file-keyword t)
(setq orb-templates
'(("r" "ref" plain (function org-roam-capture--get-point)
""
:file-name "${citekey}"
:head "#+TITLE: ${citekey}: ${title}\n#+ROAM_KEY: ${ref}\n#+BEGIN_abstract\n ${abstract}\n#+END_abstract
- keywords :: ${keywords}
* ${title}
:PROPERTIES:
:Custom_ID: ${citekey}
:URL: ${url}
:AUTHOR: ${author}
:NOTER_DOCUMENT: ${file} ;
:END:")))
Here is the bibtex entry for a sample file I tried, which I expected to work initially
@article{tothGasChromatographyNitrogen2006,
title = {Gas Chromatography Nitrogen Phosphorous Detection ({{GC}}-{{NPD}}) Assay of Tofisopam in Human Plasma for Pharmacokinetic Evaluation},
author = {Tóth, Maria and Bereczki, Andrea and Drabant, Sándor and Nemes, Katalin Balogh and Varga, Bálint and Grézal, Gyula and Tömlő, Judit and Lakner, Géza and Klebovich, Imre},
date = {2006-06-16},
journaltitle = {Journal of Pharmaceutical and Biomedical Analysis},
shortjournal = {Journal of Pharmaceutical and Biomedical Analysis},
volume = {41},
pages = {1354–1359},
issn = {0731-7085},
doi = {10.1016/j.jpba.2006.03.033},
url = {http://www.sciencedirect.com/science/article/pii/S0731708506002986},
urldate = {2020-12-23},
abstract = {Tofisopam (1-(3,4-dimethoxyphenyl)-4-methyl-5-ethyl-7,8-dimethoxy-5H-2,3-benzodiazepine) has been shown to be an effective anxiolytic agent in the wide-ranging clinical practice. A high sensitive gas chromatography nitrogen phosphorous detection (GC-NPD) bioanalytical method was developed and validated for the purpose of pharmacokinetic study of tofisopam. A liquid–liquid extraction method was used for the sample preparation. The mean recovery for tofisopam was 69.8% and the inter- and intra-day precision values were well below the 15% limit established for bioanalytical methods. A similar compound, girizopam was used as internal standard. The assay was linear in the 5–500ng/ml range corresponding to therapeutically relevant plasma levels. The concentrations of the compound were measured in the plasma samples of 12 healthy male volunteers and the pharmacokinetic parameters were determined from the plasma concentration–time data. A rapid absorption and distribution, relatively short biological half-life and considerable inter-individual variation in the plasma concentration levels of parent compound were the main characteristics of the pharmacokinetics of tofisopam. According to these results, the new (GC-NPD) bioanalytical method proved to be capable of measuring concentration of tofisopam in human plasma and was successfully applied in a single dose pharmacokinetic study.},
keywords = {Gas chromatography nitrogen phosphorous detection (GC-NPD),Pharmacokinetics,Single dose clinical study,Tofisopam},
langid = {english},
number = {4}
}
I am on the latest version of both Emacs and ORB.
This is an amazing feature and I feel lost as to what went wrong here. I would really appreciate if someone has a clue about it. Furthermore, if I forgot to provide something please tell me and I will respond as soon as I can