I'm looking for a good way to manage packages to run Emacs on many OS machines.
The Emacs version is currently 24.4.This is the version of any machine, so you don't have to consider running anything other than the latest version.
The answer I would like is to try to achieve the following preferred methods as much as possible.
Of course, I would be happy if there are other ways to benefit from the above preferred method, and I don't need to satisfy everything.
As a trial and error, I tried Package.el+'s own set of functions, Quelpa, and Cask, but I don't think any of them met all of the requirements.
Currently, I implement the following commands in Package.el to install the package.
Is there any other good way to meet the requirements?emacs
How about using use-package
There are all the elements you need to write .emacs, such as post-load settings, conditional branches, delay loads, and key settings.Plus, the library can be loaded and configured in one S formula, making it more readable.
If package.el requires automatic installation of external packages, add
:ensuret to the argument.Without it, AutoInstall will not occur and the configuration will be skipped.
If you write a recipe like this (e.g.,
.emacs.d/init.el can be installed at startup by simply writing:
It also supports the elpa package.
If you wrote the above in
.emacs.d/init.el, you can create recipes from the elpa package from
Therefore, in addition to your own recipe, you can install the elpa package as follows:
As for the questioner, I am posting because I have a certain successful approach to this issue.
Define the following with init.el or any .el (where hoge.el)
This section uses packages, adds repositories to use, and initializes packages.Change the repository as needed.
Here we define a list and write the name of the package exactly as it is , such as
This command updates the package information and installs packages that are not included.
To install the package, do one of the following:
For path/to/hoge.el, write the init.el or any .el location that defines the variables and functions above.
If defined in init.el, it will probably be
This method is complete with only configuration files and Emacs, as well as auto-installation on multiple operating systems that Emacs can handle in the package.el of Emacs.
I hope it will be helpful for someone.
Note: "Kosh said ""use-package"" and ""use-package"" was a very good extension." However, use-package is a bootstrap problem, so only package.el will write an Emacs Lisp to automatically install use-package.
Assume the first block of code in this answer (requiring)
If you write something like this before the use-package part of init.el, you can use the use-package as it is without having to install it manually.
I hope this will also be helpful.
© 2022 OneMinuteCode. All rights reserved.