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.
** 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.
New in Emacs 25.1: Easily install multifile package from a directory
20 Jan 2015, by Artur Malabarba.New in 25.1 post series
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 tomaster
was in order.As of today, Emacs 25.1 has a new feature. From the
NEWS
file:There are no new commands to remember. Just issue
package-install-from-buffer
from a dired buffer, or invokepackage-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,
Implementing comment-line »
« Be a 4clojure hero with Emacs
Related Posts
It’s Magit! And you’re the magician! in package
Emacs 25 is out! What are the new features and what were my predictions in emacs-25
validate.el: Schema validation for Emacs-Lisp in package
Content © 2019, All rights reserved. Icons under CC3.0.