@upgrd You should also set bibtex-completion-library-path to the path where you store your files, e.g. ~/pdf. Org Roam Bibtex uses bibtex-completion library to do all the BibTeX things. Note also that since recently, you can use
I re-open this discussion, since I noted (along with other users) one thing which is either a regression or a change in orb-process-file-field recently. The function has been almost entirely rewritten recently, and since then, my previous capture templates are not working anymore.
The variable bibtex-completion-library-path is correctly defined, and nothing has changed in my init file; but this issue appeared roughly with commit 039eed6. Am I missing something?
@fsantos Yes, with this commit your config has become broken. orb-file-field-extenstions may not be a string anymore, only a list. However, this change is explicitly stated in the commit message and the variable’s docstring was updated accordingly.
Note also that there is no such variable orb-process-file-field anymore and since quite a long time one can use for convenience the ${file} wildcard instead of the more verbose %(orb-process-file-field \"${citekey}\")
I will update the function slightly, so that it issues a warning instead of failing silently when something’s gone wrong.
Check the value of orb-file-field-extensions, it should be a list of extensions as strings without a dot. Only files with extensions from the list will be considered for extending the ${file} keyword. The default value is '("pdf"), which means that only PDF files will be considered.
Make sure the BibTeX entry for which you are creating a note actually has a file associated with it. Basically, whatever is picked up by helm-bibtex or ivy-bibtex will be used by ORB, except that additional filtering based on extension is applied as discussed above. The easiest way to find this out is to run helm- or ivy-bibtex and check whether the file indicator is present - typically a single leftmost character in the list of candidates. Also try to open the file from helm- or ivy-bibtex.
Upgrade to the most recent version of ORB (yesterday’s commit), run the capture and check if *Warnings* buffer exists and if there are any ORB warnings.
I do see the indicator in Helm that the file exists. However when I try to open it (Open PDF, URL or DOI), it does not open the file, instead it shows me the directory structure in the root folder. I think this might the culprit, something is not getting configured correctly.
EDIT 2: I ended up adding all the modules one by one into the config, and as such, I am now seeing warnings saying that those references are not valid references.
Could the fact that I am using the native comp branch have something to do with these errors? I tested this in emacs 27 as well, and had the same issue.
Edit: Also wanted to add that the orb-process-file-field variable is not being recognized as a variable in Doom for some reason.
So the issue was likely caused by bibtex-completion (backend for helm-bibtex and ivy-bibtex), which started misbehaving because of stale compiled files after an upgrade. I don’t know whether this was directly related to the native-comp branch. Just for your information, I cannot support different Emacs versions currently, although I have remote plans to do so. The only supported version is whatever the current stable is (27.1 as of today).
I did some testing over the weekend in VMs. The error I had reported is specifically present in the native comp branch. (Tested in Manjaro (AUR), Fedora (COPR), and manually compiled in Ubuntu)
It is not present in stable 27.1 (tested fedora, and Manjaro).
Hope that provides clarity to whoever stumbles upon this thread!