[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting package archives
From: |
Philip Kaludercic |
Subject: |
Re: Setting package archives |
Date: |
Tue, 25 May 2021 20:29:42 +0000 |
pauline-galea@gmx.com writes:
> How can I set package-archives in emacs
>
> I am using the following
>
> (defun gungadin-locate-archives ()
> "Installs package archives."
> (require 'package)
> (add-to-list 'package-archives
> '( ("gnu" . "https://elpa.gnu.org/packages/")
> ("melpa-stable" . "https://melpa.org/packages/")
> ("org" . "https://orgmode.org/elpa/")) )
> (package-initialize) )
You are adding a list *into* a list, instead of appending each of the
items *onto* the list.
What you probably want to do is
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/"))
(add-to-list 'package-archives '("melpa-stable" .
"https://melpa.org/packages/"))
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/"))
where the first `add-to-list' won't be necessary, because GNU ELPA is
configured by default.
--
Philip K.