Managing bibliographies from Emacs (v2)

This is a tentative blog post about how I am migrating from Mendely to using bibtex files in Emacs, combined with some annotation goodies to be added later on.

My current backend for managing bibliographies is ebib, a rather sleek piece of software to query and reference bibtex databases, either individually, or grouped together.

To install ebib, assuming you already have use-package, add the following lines to your .emacs file

(use-package ebib :defer t :ensure t :custom (ebib-preload-bib-files '("bibtexfile1.bib" "bibtexfile2.bib")) (ebib-bib-search-dirs '("/default/path/to/bibtex/files")))

This downloads the library from your default repository, and configures it to use some default bibtex files.

A nice complement to ebib is biblio, a library to query various databases, such as Crossref, the arXiv, etc. This library allows you to grab bibtex records for the articles you search for. The following code links this library with ebib, so that you can press Ctrl-i and the current record is added to your ebib database.

(use-package biblio :defer t :ensure t :custom (biblio-arxiv-bibtex-header "misc") :bind (:map biblio-selection-mode-map ("C-i" . biblio-to-ebib-and-quit)) :init ;; This links biblio to ebib (defun biblio-to-ebib-and-quit () (interactive) (biblio--selection-forward-bibtex (lambda (entry metadata) (print entry) (ebib-capture-raw-bibtex entry) (ebib--update-buffers)) t)) )

In order for this to work, you need the following code, which extends ebib with a function to edit raw Bibtex entries from arbitrary sources