Install a Package from a VCS Repository

Most of time the packages we need to install are already available in some of the popular package repositories (eg. MELPA or GNU ELPA). However, some Elisp code has not been packaged, Emacs 29 offers package-vc-install to install these codes easily.

For example:

(package-vc-install "https://github.com/clojure-emacs/clojure-ts-mode")

The function offers a few more parameters that allow you to specify the name of the package and a particular revision (commit) you want to use:

(package-vc-install PACKAGE &optional REV BACKEND)

If PACKAGE is a string containing an URL, download the package from the repository at that URL.

By default, this function installs the last revision of the package available from its repository. If REV is a string, it describes the revision to install, as interpreted by the VC backend.

Optional argument BACKEND specifies the VC backend to use for cloning the package's repository. If BACKEND is nil, the function uses package-vc-heuristic-alist to guess the backend.


Top