Skip to content
Emacs code to automatically look up the latest version of a library from clojars and insert it into your running session.
Emacs Lisp
Pull request Compare This branch is 20 commits behind AdamClements:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Latest clojure libraries resolver for Emacs

Looks up the latest version of clojure libraries on clojars/maven and automatically populates the buffer with the appropriate dependency vector. Optionally uses pomegranate to load the dependency directly into your running nrepl.


Requires lein-ancient to be in your .lein/profiles.clj :plugins vector and optionally cemerick.pomegranate to be in your :dependencies vector if you want the feature which automatically adds the library to your classpath without restarting the repl.

latest-clojure-libraries is available on both major package.el community maintained repos - Marmalade and MELPA.

If you're not already using Marmalade, add this to your ~/.emacs.d/init.el (or equivalent) and load it with M-x eval-buffer.

(require 'package)
(add-to-list 'package-archives
             '("marmalade" . ""))

For MELPA the code you need to add is:

(require 'package)
(add-to-list 'package-archives
             '("melpa" . "") t)

And then you can install latest-clojure-libraries with the following commands:

M-x package-refresh-contents [RET]

M-x package-install [RET] latest-clojure-libraries [RET]

or by adding this bit of Emacs Lisp code to your Emacs initialization file(.emacs or init.el):

(unless (package-installed-p 'latest-clojure-libraries)
  (package-install 'latest-clojure-libraries))


M-x insert-dependency

It will then ask you for "Library name:" (e.g. incanter), and whether you want to attempt to add it to the classpath of your currently running repl. It will then insert theh dependency vector with the latest version number at your current cursor position.

To make use of the feature which injects the library into the current repl, you need pomegranate on your classpath. You can add this in your .lein/profiles.clj and it will be available everywhere (leiningen 2). (note depending how you run your project this may not be visible and you may need to put it in your :user :dependencies)

{:dev {:dependencies [[com.cemerick/pomegranate "0.2.0"]]}}


  • Output from adding to the repl's classpath is currently a little ugly.
Something went wrong with that request. Please try again.