reddit / emacs

straight-use-package doesn't install info files for the transient package

quokka70 · 2022-10-13 19:03
TL;DR: I need to specify a `:files` value inside the `use-package` form, but this has irritating side-effects. I install packages with `straight` and `use-package`. I use the `transient` package. I noticed that its info manual didn't appear for me with `C-h i`. I dug deeper and realized that .../straight/build/transient didn't contain a `dir` file or any of the doc files. Several other packages, like `orderless`, did include `dir` in their straight/build directories, but their repo directories also happen to store the doc files at the top level. `transient` is different in that its repo has a docs/ subdirectory, which seemed to be the source of the problem. But `magit` has a similar repo structure, and its docs were installing fine. I noticed that the recipe for `magit` has a `:files` key which pulls in the doc file. Adding :straight (:files (:defaults "docs/*")) to my `(use-package 'transient ...)` form appears to do the trick - and automagically triggers a `make docs` command for transient somehow - but now I have two wrinkles: * straight rebuilds `transient` every time I start Emacs * I get a warning "Warning (straight): Two different recipes given for "transient" (:files cannot be both nil and (:defaults "docs/*"))" The first issue is annoying, but isn't a showstopper. I don't restart Emacs very often and my startup time is already slow. The second issue worries me, because I don't know whether it means that updated docs will actually get installed in the future. Presumably the clash is between my `(use-package 'transient ...)` and the recipe that gets used when `transient` is handled as a dependency of `magit` (which I also use). But which recipe is actually used to install `transient` now? Is it getting installed twice every time? I don't know why the transient docs aren't getting installed "out of the box" as they apparently are for everyone else. What might I be doing wrong?
MitchellMarquez42 · 2022-10-13 22:37
If the `use-package magit` comes before transient in the file, straight auto-registers the default recipe for all its dependencies. Move transient above magit and it shouldn't give the warning about conflicting recipes.