Emacs configuration and use-package

Posted: - Modified: | emacs

Watching the second Experimental Emacs Hangout nudged me to improve how I use use-package in my Emacs configuration.

I had been using use-package‘s :init and :config keywords as a more readable and less-error-prone versions of eval-after-load. (Well, technically, :init happens before it's loaded, and :config is evaluated after it fully loads.) I also used :bind for global keybindings.

I didn't know about :ensure and :diminish. Adding :ensure let me get rid of my custom sacha/package-install function, and :diminish let me remove a few lines related to my modeline.

One of the benefits of sharing my configuration is that other people pick up ideas, and then I pick up more ideas from their ideas. I get an excuse to revisit packages that may have added features since the last time I checked them out. I learn from other people's combinations and customizations.

There's so much to learn about Emacs, even just in terms of the packages that I've already configured. Sometimes I start with just the basics and settle into a routine, forgetting that there are even more things I can do. Sometimes people make incompatible changes, and I have to figure out how to adapt. Sometimes packages become unmaintained, and eventually replacements emerge. Always, always, people write more code, add more features, extend Emacs to do more things. It's never just about what new things I can do. It's also about this community of people who tickle their brains by building cool stuff, who follow “What if?” to interesting places.

Anyway. :ensure and :diminish, and a few improvements to my config. (Also because I just switched to the 64-bit binary for Emacs 24.4, how exciting…)

Hat-tip to @gozes for nudging me to write about this – back in April!

You can comment with Disqus or you can e-mail me at sacha@sachachua.com.