dimitri / el-get

Manage the external elisp bits and pieces upon which you depend!
http://tapoueh.org/emacs/el-get.html
1.64k stars 457 forks source link

package-archive-priorities ignored when specifying :repo with type: elpa #2832

Open Niluge-KiWi opened 3 years ago

Niluge-KiWi commented 3 years ago

My goal is to use melpa stable by default for packages with :type elpa, and use melpa (non stable) for select packages.

The way I tried to do this is to set package-archive-priorities and specify :repo in the receipe of select packages:

(require 'package)
(setq package-archives
      '(("gnu" . "https://elpa.gnu.org/packages/")
    ("melpa" . "https://melpa.org/packages/")
    ("melpa-stable" . "https://stable.melpa.org/packages/"))
      package-archive-priorities
      '(("gnu" . 5)
    ("melpa" . 0)
    ("melpa-stable" . 10)))
(package-initialize)

(setq el-get-sources
      '(
       (:name magit :type elpa)
       (:name solarized-theme :type elpa
               :repo ("melpa" . "https://melpa.org/packages/"))))

(el-get 'sync)

Result:

Analysis: https://github.com/dimitri/el-get/blob/d76ac84ae9670de7bf7725b362cafe86688771f9/methods/el-get-elpa.el#L71-L74 (el-get-elpa-package-id 'solarized-theme) returns version 1.3.1 from melpa-stable, ignoring the :repo I defined in the receipe.