3 ms·
Ideally use-package would simply be included in emacs, so you could rely on it. Apparently they are getting close: https://github.com/jwiegley/use-package/issu
by faho 4y ago
Ideally use-package would simply be included in emacs, so you could rely on it.
Apparently they are getting close: https://github.com/jwiegley/use-package/issues/282 https://github.com/jwiegley/use-package/issues/282
Until then, I have this in my init.el to install it if necessary:
;; Install use-package because that installs everything else
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(require 'use-package)
- hprotagonist 4y agoexcept that use-package, by itself, does not install anything. NOTE: use-package is not a package manager! Although use-package does have the useful capability to interface with package managers (see below), its primary purpose is for the configuration and loading of packages. (I use straight, which interfaces nicely into use-package.)
- faho 4y ago> except that use-package, by itself, does not install anything. It can be configured to install things (by using the builtin package.el): https://jwiegley.github.io/use-package/keywords/#ensure-pin https://jwiegley.github.io/use-package/keywords/#ensure-pin > You can use use-package to load packages from ELPA with package.el. This is particularly useful if you share your .emacs among several machines; the relevant packages are downloaded automatically once declared in your .emacs. The :ensure keyword causes the package(s) to be installed automatically if not already present on your system (set (setq use-package-always-ensure t) if you wish this behavior to be global for all packages) So if all you need is package.el (and there's a good chance that's the case), you can just (setq use-package-always-ensure t) and your configuration will now install the packages if you copy it to a new system.