Posted on 2022-12-22 · last modified: 2023-05-18 · 2 min read · emacs
I’d like to announce a small package I’ve written: vc-use-package. It is a first attempt at integrating the new (as of Emacs 29)
package-vc.elwith the now built-in use-package. I’ve already talked about how these two interact in my last post—you can see this package as automating things juuuust a little more. Update (2023-05-18): This is now built into Emacs 30! Check here for more details.
Motivation§For the last post, someone gave me some feedback: couldn’t we go a little further? In particular, they wanted a new
:vckeyword for use-package, much like quelpa has done with quelpa-use-package. I already gave them a small working example in a follow-up comment, but figured this might actually interest enough people so that turning it into a proper package could be worth it; and here we are! The basic premise is really this simple—we create a handler for a new
:vcuse-package keyword. It can be used like so:
One can specify most arguments that
(use-package math-delimiters :vc (:fetcher github :repo oantolin/math-delimiters))
package-vc-installalso accepts; for example:
Much like quelpa-use-package, there is some care needed concerning the interaction between this package and the
(use-package math-delimiters :vc (:fetcher "github" :repo "oantolin/math-delimiters" :rev "master" ; also accepts the special `:last-release' :backend Git))
use-package-always-ensurevariable, but this should mostly be taken care of automatically. For more information (and manual controls), see the readme.
Conclusion§As I said above, this is no longer only available as an external package, but actually built into Emacs! By virtue of being a part of it now, the integration with
use-packageis a lot tighter—try it out if you’re using
HEADanyways! If not, then don’t worry:
vc-use-packagewill not go anywhere for the forseeable future.