Hjertnes.blog

Another one on use-package

2019-02-23

I have written about use-package before, but I’m going to try again because I don’t think I got my point across.

Use-package is a emacs package that cotnains a macro called use-package, it makes it easy to deal with packages in a clean manner. n

If you take my typical emacs setup before emacs I had this long list of packages, that I looped over and checked if they were installed, if not I installed them. Then all of it was loaded and configured in a very speicifc manner to make sure it all worked. Use-package solves all of this.

The way it works is that it have a lot of different keywords that you can usem and the result is that you can avoid all kinds of nesting and weird issues, and just write the config in a way it makes sense to you. The reason I got started with it was because of the :ensure keyword, because that enabled me to install and load in one step.

Here is the documentation: https://jwiegley.github.io/use-package/keywords/. The way I have gone deeper and deeper into it is by starting simple and using new stuff as I see a place for it.