2

I know that one should indicate the bib files for org-ref. I happen to have a huge amount of bib files (exported from Mendeley for each Mendeley folder).

My question: Is it possible to just indicate the path instead of every bib file?

(setq org-ref-default-bibliography '("~/Dropbox/Bib/"))

1 Answer 1

4

You can do this to add all the .bib files in that directory:

(require 'f)
(setq org-ref-default-bibliography (f-files "~/Dropbox/Bib" (lambda (f) (f-ext? f "bib"))))
2
  • Thank you. I guess I have to do the same for (setq helm-bibtex-bibliography '("~/Dropbox/Bib"))? Another issue I noticed now is that it is not loading all entries, just a few hundred. May 15, 2017 at 7:41
  • 3
    There is a built-in and significantly more efficient way of doing the exact same thing: (directory-files "~/Dropbox/Bib" t "\\.bib\\'"). See the documentation for functions directory-files and directory-files-recursively.
    – Basil
    May 15, 2017 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.