Adding Marmalade as Package Source
Asked Answered
A

1

21

I'm trying to add Marmalade as a package source, but when I do so I get the error:Symbol's value as variable is void: package-archives. Anyone know how to resolve this? Below is my .emacs file.

;;; This was installed by package-install.el.
;;; This provides support for the package system and
;;; interfacing with ELPA, the package archive.
;;; Move this code earlier if you want to reference
;;; packages in your .emacs.
(when
    (load
     (expand-file-name "~/.emacs.d/elpa/package.el"))
  (package-initialize))

(add-to-list 'load-path (expand-file-name "~/.emacs.d"))
(add-to-list 'load-path  "~/.emacs.d/plugins")
(add-to-list 'load-path "~/.emacs.d/plugins/color-theme")
(add-to-list 'load-path "~/.emacs.d/plugins/groovy")

(require 'package)
(add-to-list 'package-archives
         '("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)

To install package.el

I ran the following code:

(let ((buffer (url-retrieve-synchronously
           "http://tromey.com/elpa/package-install.el")))
  (save-excursion
    (set-buffer buffer)
    (goto-char (point-min))
    (re-search-forward "^$" nil 'move)
    (eval-region (point) (point-max))
    (kill-buffer (current-buffer))))
Alamode answered 2/9, 2011 at 18:48 Comment(2)
What is the version of package.el? How did you get it? If it's the elpa package.el: It doesn't include package-archives and has no possibility to add repositories.Mccaslin
@Michael Markert: I think the latest one; I got it by running the code at the bottom of my OP. Yes, it's the elpa package.el. Which other package.el(s) are there?Alamode
M
13

Use the package.el to be included with emacs24, as the ELPA version doesn't include package-archives and support for multiple repositories.

It is found here (emacs24!): http://bzr.savannah.gnu.org/lh/emacs/trunk/annotate/head:/lisp/emacs-lisp/package.el

Last emacs23 compatible version: http://repo.or.cz/w/emacs.git/blob/ba08b24186711eaeb3748f3d1f23e2c2d9ed0d09:/lisp/emacs-lisp/package.el

Drop it into your loadpath and settle for one type of loading (that is drop the lines after the comment).

Mccaslin answered 2/9, 2011 at 19:36 Comment(2)
I'm using emacs 23.3.1 and the package.el you linked to doesn't seem to work. Further, do you want me to drop all the lines after the comments? Or just *(when ... )?Alamode
Oh I forgot, backward compatibility was broken a few months ago, I added the last emacs23-compatible version to my post. As for dropping: Just the when and replace the require with the load if you want to keep the path.Mccaslin

© 2022 - 2024 — McMap. All rights reserved.