Skip to content

Walheimat/junk

Repository files navigation

junk

Coverage Status

junk allows you to group packages as an expansion pack that can be installed together and optionally with so-called extras.

It grew out of my configuration and therefore is currently still heavily geared towards my usage.

Installation

If you use straight or quelpa, you know what to do.

If you’re on Emacs >29, I recommend using package-vc-install.

Alternatively, provided you have Cask, you can install the package with make package-install. You will need to run git submodule init first to clone dinghy dependency.

Usage

You can use junk-expand to create a named expansion pack that includes packages that will always be installed and optional extras. Normals packages use the :packages keyword; recipes (installed using package-vc-install and appropriate specs) use :recipes.

(junk-expand big-pack
  "Additional packages for big users."
  :packages (slime cider)
  :extras (clojure-mode puni)
  :recipes ((junk (:url "https://github.com/Walheimat/junk.git"))))

You can now install big-pack by calling junk-install. It will install slime, cider and junk. When called again, it will prompt to install one of the extras. If all packages are installed, it will just emit a message to that effect.

If you use marginalia you can use the annotation function junk-annotate.

(add-to-list 'marginalia-annotator-registry '(expansion-pack junk-annotate builtin none))
(add-to-list 'marginalia-command-categories '(junk-install . expansion-pack))

If you use use-package (and why wouldn’t you), you might want to call junk-setup-use-package. This will make sure the use-package-ensure-function is not called for junk packages. So even if you had set use-package-always-ensure to t, those packages would not be installed (provided the related junk form is above the use-package form).

Please have a look, again, at my configuration for usage examples.