开发者

Slime mode error

开发者 https://www.devze.com 2023-03-16 08:59 出处:网络
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 th

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 varia开发者_StackOverflow中文版ble 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.


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


  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.


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'


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号