Slime mode error
Asked Answered
L

5

5

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.

Linseed answered 28/6, 2011 at 12:54 Comment(0)
M
8

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

Myrnamyrobalan answered 28/6, 2011 at 17:51 Comment(0)
F
2
  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.

Florance answered 4/10, 2011 at 7:27 Comment(0)
S
1

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'

Sear answered 28/6, 2011 at 14:2 Comment(3)
Thanks it currently still wont work. ELPA works but marmalade wont. Which is a shame because clojure mode on marmalade is 1.9.4 and on ELPA 1.7.1. One things certain the directions on marmalade-repo.org are definitely vague and likely not accurate.Linseed
If you always want to have fresh version, you can look onto el-get package (github.com/dimitri/el-get)Sear
I just tried on my fresh Emacs (from BZR) and package.el shows version from marmalade-repo -- 1.9.2Sear
V
0

It seems to me you're missing either (require 'package) or (package-initialize). You can check out my setup here - I'm using both marmalade and clojure-mode on Windows 7 and it works like a charm.

Voltaire answered 28/6, 2011 at 17:37 Comment(4)
I have put the package.el in my .emacs.d directory and it still wont load with the (require 'package) and/or (package-initialize) in .emacs. I tried your git package created a directory and cloned to C:\emacs_kit\emacs-dev-kit created ln -s C:/emacs_kit/emacs-dev-kit ~/.emacs.d . After starting emacs though M-X slime still had no match error.Linseed
On windows 7 .emacs.d should be in "c:/Users/Username/AppData/Roaming/.emacs.d" - otherwise Emacs won't pick it up.Voltaire
oh yeah I agree, I am trying to setup emacs to work with clojure on a XP PC, Win7 Laptop & Vectorlinux box.Linseed
~/.emacs.d is not on the load-path by default, so even if you've put package.el there, you won't be able to require it. Try (add-to-list 'load-path (expand-file-name "~/.emacs.d"))Dishpan
T
0

Do not know it is same problem, I faced when I were trying to use quicklisp's swank/slime

Finally I found that few /contrib/*.el packages were dependent on each other if A's dependency package is B, if B is not byte-compiled than A will not compile

when you do (require 'A)

it will throw Symbol's variable value is void: A

So ensure you compile each package than try require.

Towers answered 23/7, 2011 at 20:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.