Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slime mode error

I was following the guide and information from A gentle tutorial to Emacs/Swank/Paredit for Clojure

However after opening elpa and installing clojure-mode, slime and paredit. I restarted emacs and then attempted to use M-x slime however it continually says no match . What am I doing wrong?

I then tried to install clojure-mode from marmalade http://marmalade-repo.org/packages I byte-compiled package el and then added (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) to my.emacs. However marmalade errors with Symbol's value as variable is void: package-archives .

Unsure exactly what I am doing wrong I am on windows7 using emacs 23.3. I have clojure installed to c:/clojure.

Any help appreciated.

like image 515
sayth Avatar asked Jun 28 '11 12:06

sayth


3 Answers

My init.el has both (require 'package) and (package-initialize). It's not very big, it looks like this:

(require 'package)
;; Add the original Emacs Lisp Package Archive
(add-to-list 'package-archives
             '("elpa" . "http://tromey.com/elpa/"))
;; Add the user-contributed repository
(add-to-list 'package-archives
             '("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)

I'm on emacs 24 (a development build) on Windows 7. I had trouble getting emacs 23 to work with packages too, it was easier for me to just upgrade.

By the way, I noticed that if I set a HOME environment variable, emacs looks there for the .emacs.d directory (instead of in %USER_PROFILE%\AppData\Roaming).

like image 135
Nathan Hughes Avatar answered Nov 05 '22 03:11

Nathan Hughes


  1. Download package.el (don't follow the instructions on the ELPA site, just download the package.el provided on marmalade's site).
  2. Put package.el in your .emacs.d directory (~/.emacs.d/).
  3. Add the following to your .emacs file (~/.emacs):

;;Load path to my packages

(add-to-list 'load-path "~/.emacs.d/")

;;Load ELPA (the package.el you downloaded from marmalade)

(require 'package)

;;Load Marmalade (the code found on marmalade's welcome page)

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

That's it! I really hope this helps.

EDIT: Sorry, I forgot to mention that you need to add (package-initialize) at the end of the code I provided. If you don't add this line, the packages will install, but won't load.

like image 2
Amaury Hernández Águila Avatar answered Nov 05 '22 01:11

Amaury Hernández Águila


I think, that you need to put

(require 'package)

before 'add-to-list'

P.S. and add following call after 'add-to-list'

(package-initialize)

this command will load installed packages and activate them

P.P.S. '(require 'package)' maybe not needed, but I'm personally not using 'package.el'

like image 1
Alex Ott Avatar answered Nov 05 '22 03:11

Alex Ott