I think you need to put the local variables in two places, which is the org file and the bib file. The issue is that the notes functions are called while the bibtex buffer is active, so the local variables in the org file do not affect them.
In my org file I put something like
* File Local Variables
# Local Variables:
# org-ref-bibliography-notes: "/Users/...
The order of the components of the key are hard-coded, so you can't change them with a user option. However, you can re-write the function to set the order you want. You need to load your modified function after the original version, so your modification will replace it. The following code does this:
Helm Bibtex entries are presented in the reverse of the order in which they appear in your .bib file: https://github.com/tmalsburg/helm-bibtex/issues/21
You can reverse this order with the following (taken from the linked thread). Put this in your .emacs:
Here's a basic function to look up the entry and title based on the citation at point (bibtex-completion is a dependency of org-ref):
(defun my/print-reference-title ()
"Print the title to the reference at point in the minibuffer."
Suppose instead of putting all your reagents in one file, and then looking them up you use a syntax like:
#+attr_org: :type reagents
| Tween 20 | Sigma-Aldrich | batch-1 |
| acetone | Fisher | 3456 |
in your notebook entries. then, you can loop through your notebook files and collect them, and use that information in a completion tool like helm. ...
In a similar approach to @giordano, I would suggest you have a look at the excellent Org-Ref, which is a collection of org-mode modules for citations, cross-references, bibliographies in org-mode and useful bibtex tools; together with Helm-Bibtex, which can be used in unison with org-ref to search and manage your bibliographies.
With your insert reference ...
To check if a field exists, one approach is:
(defun bibtex-field-exists-p (field)
(let ((entry (bibtex-parse-entry)))
(assoc field entry))))
If the field is missing, you could do something like:
(unless (bibtex-field-exists-p "journal")
(bibtex-make-field '("journal" nil "missing" nil)))
You can add something like this to your init file to do that.
"Copy formatted citation(s)"
(cl-loop for key in (helm-marked-candidates)
collect (org-ref-format-entry key))
You have to allow frame breaking by adding the corresponding Beamer option as an Org property to the slide heading:
Take a look at the documentation of org-ref-get-pdf-filename-function. You can set it to either org-ref-get-mendeley-filename or org-ref-get-pdf-filename-helm-bibtex. Both the variants support Mendeley file fields.
It is possible to use a different backend than helm-bibtex which offers different sorting options. The org-ref-helm-cite backend allows you to sort by key, year and first author lastname (both ascending and descending) with key bindings. You type M- and then you get a menu to select the sort type and direction. It is not a well-used feature even by me, so ...
[This is not an answer: it's more debugging suggestions to avoid a long comment thread]
I evaluated (org-ref-list-index "einstein" '("knuthwebsite" "latexcompanion" "einstein")) in 26.3 and I get 2 there as well: no error (I started with emacs -q and initialized the package system by hand in order to load org-ref which ...
I could succesfully config org-roam-bibtex after a lot of tries.
This is my config if someone finds useful. I copied all the config from https://rgoswami.me/posts/org-note-workflow/
The part that gave me an issue is the org-ref-default-bibliography which must be a list even if you have only one directory for your bibtex file (otherwise it will throw you an ...
You seem to be on a MAC, but the PDF key in the bibtex contains a Windows path. Maybe Zotero should export differently?
Not sure if this helps but I setup the variable
(setq bibtex-completion-library-path "~/cloud/Papers/")
to the path which contains all my papers. And then the bibtex entries only have the name of the file (with no path) in them.
If you know the bibtex key you want to cite then you can use org-insert-link to do this. Usually that is bound to C-c C-l, you will be prompted for what kind of link, you can choose cite (the capitalization is a little annoying and you might have to figure out how to not get Cite with this. I use ivy, and I have to toggle the case sensitivity, and search for ...
As stated in the comments, the statement (setq-default case-fold-search nil) conflicts somehow with the org-ref-open-bibtex-notes. The emacs wiki mentions that case-fold-search set to nil means that searches are case-sensitive, and non-nil means searches are case-insensitive. This variable affects how lots of programs work (as in this case).
On the final ...
You may want to change the default citation type in your init.el file to the one you use a lot, e.g.:
(setq org-ref-default-citation-link "citep")
C-u is for a universal-argument in regular emacs. I think it is bound to Spc-u in Spacemacs. Maybe typing that inside the helm window will lead to alternate citation types.
from the org-ref manual:
Controlling link messages and tooltips
Org-ref is setup to provide messages in the minibuffer when your cursor is on a link, and tooltips when your mouse hovers over a link. If this is distracting you can turn it off by putting this in your init file:
(setq org-ref-show-citation-on-enter nil)
Alternatively, you can turn this on ...
I am beginning to suspect that, in Emacs, the best way to find out answers is to look though the source code... Looking through the code of org-export-as reveals the answer: org-export-expand-include-keyword.
You could use the amusingly named function (org-org-export-as-org), which will export to a buffer named *Org ORG Export* with all the #+INCLUDE lines expanded. Then you could do your further processing and export from that buffer.
Full documentation for the function:
org-org-export-as-org is an interactive autoloaded compiled Lisp
function in ‘ox-org.el’.
Yes, it should be safe (assuming you're careful enough to make sure that the buffer is really unchanged in the end).
But be careful: if the code that is run while the buffer is modified is complex enough you might get into trouble (e.g. it might fill the syntax-ppss cache with data which won't be flushed when you undo the changes). Even worse if the code ...
yes, but you have to do it for each link. Assuming you are using org 9, you can do it like this in an init file, or in an elisp src block in your org-file:
(org-link-set-parameters "cite" :export 'some-new-export-function)
Raise a bug report with the author of org-ref.
doi-utils-add-bibtex-entry-from-doi in doi-utils.el of that package does this:
(when (not (looking-back "\n\n" 3))
Which is a very odd-looking constraint, but then I really don't know anything about this code or its usage.
Clearly in your instance, point is < 3, so that triggers an ...