请问如何给purcell的配置添加镜像


#1

请问如何给purcell的配置添加镜像,我在init-local.el加了镜像,却不见生效


#2

fork 后,更改 purcell 的代码。。。。


#3


#4

我是如何解决这个问题的?

$ git clone https://github.com/purcell/emacs.d.git ~/.emacs.d
$ rg package-archives ~/.emacs.d
lisp/init-elpa.el
21:  (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
23:  ;;(add-to-list 'package-archives (cons "melpa-mirror" (concat proto "://www.mirrorservice.org/sites/melpa.org/packages/")) t)
109:    (let ((longest-archive-name (apply 'max (mapcar 'length (mapcar 'car package-archives)))))

$ emacs -Q ~/.emacs.d/lisp/init-elpa.el

// add below lines before "(provide 'init-elpa)" in the file
(setq package-archives '(("gnu"   . "http://elpa.emacs-china.org/gnu/")
                         ("melpa" . "http://elpa.emacs-china.org/melpa/")))

// you maybe need to do this step
$ mv ~/.emacs{,.backup}

// start emacs configuration initialization 
$ emacs

Links: