10

For the sake of tidiness, I'd like to group setq(s) under single, related banner. Let's say I want to set the value of compilation-scroll-output in "compilation" unit like this:

(use-package compilation
  :init
  (progn
    (setq compilation-scroll-output t)))

All I get is:

Could not load compilation

How is it?

jacekmigacz
  • 202
  • 3
  • 9

1 Answers1

14

The package's name is compile.

Below should work.

(use-package compile
  :init
  (progn
    (setq compilation-scroll-output t)))

It would be worthwhile to note @JordonBiondo's comment on how to figure out a package's name.

If you want to know which package a variable belongs to, do C-h v or M-x describe-variable followed by the var name (for a function name, C-h f or M-x describe-function). From the *Help* window that pops up, navigate to the package's .el file and see the (provide ..) call to find out the package name.

Kaushal Modi
  • 25,651
  • 4
  • 80
  • 183
  • 2
    Use-package's syntax around the keywords is slightly unusual. The forms following most of the keywords are bundled up for that keyword for you. So the progn is rarely needed. (use-package compile :init (message "init for compile") (setq compilation-scroll-output t)) – Ben Hyde Dec 22 '15 at 16:14
  • 5
    @BenHyde That's correct; progn is not required but I use it for convenience. If I have bunch of forms under :init and a bunch of forms under :config, having wrapped them in (progn ..) makes it very convenient to eval the whole of :init or :config using C-x C-e. – Kaushal Modi Dec 22 '15 at 16:21