Endless Parentheses

Concise ramblings on Emacs productivity.

New in Emacs 25.1: Easily install multifile package from a directory

When developing a package, package-install-from-buffer is a very useful command. It installs the current buffer as an Elpa package, so you can test installation, byte-compilation, autoloading, and activation, all in one fell swoop. If your package has multiple files, however, it gets a little more complicated.

Earlier this month, I asked on Emacs.SE whether there was a simple way to manually install a multifile package. As discussed in Phils' answer, you need to create a -pkg.el file, tar the package, and then invoke a command on the tar file. That's two steps too many for me, so a push to master was in order.

As of today, Emacs 25.1 has a new feature. From the NEWS file:

** package-install-from-buffer and package-install-file work on directories. This follows the same rules as installing from a .tar file, except the -pkg.el file is optional.

There are no new commands to remember. Just issue package-install-from-buffer from a dired buffer, or invoke package-install-file and give a directory. Whichever package is contained in that directory will be read and installed, be it single or multifile, no taring or -pkg.el file necessary.

Tags: package, emacs-25, emacs

Say thanks on Gratipay
comments powered by Disqus