Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to install ELPA packages from command line?

Tags:

emacs

elisp

elpa

I'm interested in standardizing the emacs configurations that a few of us use (~5 people).

Is there a way to install ELPA packages from lisp functions that can be included in a script if we know the set of packages we want? All I can find is how to call up list-packages and install individual packages graphically.

like image 623
hatmatrix Avatar asked Oct 12 '13 06:10

hatmatrix


People also ask

How do I install an ELPA package?

Install a PackageFind the package you want, move cursor to the line, press Enter . A description pane will pop up. Put cursor on the pane, press Tab to move cursor to the “Install” button then press Enter . The package is now installed.

How do I install a package with melpa?

el package (available in MELPA) that will allow you to enable only certain packages or exclude certain packages. You can install the package manually by pasting this into your *scratch* buffer and evaluating it.

How to install extension in emacs?

Type M-x list-packages to open the package list. Press 'i' to mark for installation, 'u' to unmark, and 'x' to perform the installation. Press 'RET' to read more about installing and using each package.


2 Answers

What you need is to use package-install function, like:

(mapc 'package-install install-list)

the install-list variable should contain a list of names of packages that you want to install.

like image 94
Alex Ott Avatar answered Sep 28 '22 06:09

Alex Ott


Another thing you can do it make your own package that depends on the other packages that you want installed. Then install that package.

Packages can be installed from file with:

M-x package-install-from-file

or you can make your own package archive with the package in, you can use elpakit to do that.

You can also do this from the command line:

emacs -e "(progn (package-initialize)(package-install 'packagename))"

to install from the operating system command line if you wish.

like image 23
nic ferrier Avatar answered Sep 28 '22 07:09

nic ferrier