Emacs noob here, I want to use melpa-stable
whenever possible for my packages.
use-package
has an option for this, use-package-always-pin
.
By default package.el prefers melpa over melpa-stable due to the versioning (> evil-20141208.623 evil-1.0.9), so even if you are tracking only a single package from melpa, you will need to tag all the non-melpa packages with the appropriate archive. If this really annoys you, then you can set use-package-always-pin to set a default.
How am I supposed to set this?
The documentation for the variable is:
use-package-always-pin is a variable defined in `use-package.el'.
Its value is nil
Documentation:
Treat every package as though it had specified `:pin SYM.
You can customize this variable.
Since you would :pin
like this
(use-package smooth-scrolling
:pin melpa-stable)
I would assume that it would one of these
(setq use-package-always-pin melpa-stable)
(setq use-package-always-pin 'melpa-stable)
but either one (tried separately) gets me the error:
Symbol's value as variable is void: melpa-stable
If I start emacs and then eval (setq use-package-always-pin 'melpa-stable)
it seems to work as expected. I would guess it was some kind of load order issue, but I'm pretty clueless about how that works.
I tried:
(with-eval-after-load 'use-package
(setq use-package-always-pin 'melpa-stable))
No luck.
(setq use-package-always-pin "melpa-stable")
?use-package
and:pin
right now: #343 has some explanation which references this answer which states: “package-pinned-packages
must be set before callingpackage-refresh-contents
”.