unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Setting package archives
@ 2021-05-25 16:08 pauline-galea
  2021-05-25 20:29 ` Philip Kaludercic
  0 siblings, 1 reply; 2+ messages in thread
From: pauline-galea @ 2021-05-25 16:08 UTC (permalink / raw)
  To: Help Gnu Emacs

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) )






^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Setting package archives
  2021-05-25 16:08 Setting package archives pauline-galea
@ 2021-05-25 20:29 ` Philip Kaludercic
  0 siblings, 0 replies; 2+ messages in thread
From: Philip Kaludercic @ 2021-05-25 20:29 UTC (permalink / raw)
  To: pauline-galea; +Cc: Help Gnu Emacs

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.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-25 20:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-25 16:08 Setting package archives pauline-galea
2021-05-25 20:29 ` Philip Kaludercic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).