How-to-pack-always-pin-ni qanday o'rnataman?

Emacs noob bu erda, paketlarim uchun iloji boricha melpa-stable dan foydalanmoqchiman.

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.

Buni qanday qilib qo'yish kerak?

O'zgaruvchining hujjatlari:

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.

Buning uchun : pin ni ishlatasiz

(use-package smooth-scrolling
  :pin melpa-stable)

Buni ulardan biri bo'lishini taxmin qilardim

(setq use-package-always-pin melpa-stable)
(setq use-package-always-pin 'melpa-stable)

ammo ikkalasi ham (alohida-alohida harakat qilmoqda) meni xato qiladi:

Symbol's value as variable is void: melpa-stable

Emacs dasturini boshlaganimda, keyin (setq use-package-always-pin 'melpa-stable) ni ko'rib chiqsangiz, kutilganidek ishlaydi. Menimcha, bu yukni tartibga solishning bir nechta turi edi, lekin bu qanday ishlayotgani haqida o'ylamayman.

Men harakat qildim:

(with-eval-after-load 'use-package
  (setq use-package-always-pin 'melpa-stable))

Omad yo'q.

5
Hozirda use-package va : pin bilan bog'liq ba'zi muammolar ko'rinadi: # 343 , bu javobni : package-pinned-packages package-refresh-contents deb nomlangan oldin o'rnatilgan bo'lishi kerak.
qo'shib qo'ydi muallif Greg, manba
(setq use-package-always-pin "melpa-stable") ni sinab ko'rsangiz bo'ladimi?
qo'shib qo'ydi muallif K-H-W, manba

1 javoblar

use-package-always-pin o'zgaruvchilari mag'lubiyatga o'rnatilishi kerak. (use-package) dan oldin uni sozlash siz uni qanday ishlatishingiz kerak. Standart qiymatni berish uchun mo'ljallangan, shuning uchun : pin ni bir necha marta o'rnatish shart emas. Misol uchun:

;; Automatically :ensure each use-package.
(setq use-package-always-ensure t)
;; Default value for :pin in each use-package.
(setq use-package-always-pin "melpa-stable")

(use-package editorconfig
  :config (editorconfig-mode 1))

(use-package js2-mode
  :pin "melpa" ;; Use unstable version.
  :mode ("\\.js\\'" . js2-jsx-mode)
  :interpreter ("node" . js2-jsx-mode))

Buning uchun use-package da : pin va : ishonch hosil qiling ishlamasligi kerak (hech bo'lmaganda 2017-06- 24), shuning uchun aralash natijalar bo'lishi mumkin.

1
qo'shib qo'ydi