marick/Midje — Issue #79: error during initialization: "Cannot open load file, slime"
Author: gw666
Created: 2011-12-23 04:25:27+00:00
State: open

I'm on emacs24 on Mac OS, got this error (caused somehow by midje-mode) on booting Emacs:

Warning (initialization): An error occurred while loading `/Users/gw/.emacs.d/init.el':

File error: Cannot open load file, slime

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace.

Because of the way Emacs.app is packaged, I can't run it with the `--debug-init` option, but I can C-x C-e successive statements of my `.emacs.d/init.el` file (appended at the end of this message). When I did this for `(require 'midje-mode)`, I got the following:

Debugger entered--Lisp error: (file-error "Cannot open load file" "slime")
require(slime)
eval-buffer(# nil "/Users/gw/.emacs.d/elpa/midje-mode-0.1.0/midje-mode.el" nil t) ; Reading at buffer position 275
load-with-code-conversion("/Users/gw/.emacs.d/elpa/midje-mode-0.1.0/midje-mode.el" "/Users/gw/.emacs.d/elpa/midje-mode-0.1.0/midje-mode.el" nil t)
require(midje-mode)
eval((require (quote midje-mode)) nil)
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)

I tried adding a slime.el file that I got off github, but that just made the error different (I admit, this was a "wave a dead chicken" gambit,but sometimes, they work.) Again, here is the result of evaluating `(require 'midje-mode)`:

Debugger entered--Lisp error: (void-variable > nil "/Users/gw/.emacs.d/gw-site-lisp/slime.el" nil t) ; Reading at buffer position 13
load-with-code-conversion("/Users/gw/.emacs.d/gw-site-lisp/slime.el" "/Users/gw/.emacs.d/gw-site-lisp/slime.el" nil t)
require(slime)
eval-buffer(# nil "/Users/gw/.emacs.d/elpa/midje-mode-0.1.0/midje-mode.el" nil t) ; Reading at buffer position 275
load-with-code-conversion("/Users/gw/.emacs.d/elpa/midje-mode-0.1.0/midje-mode.el" "/Users/gw/.emacs.d/elpa/midje-mode-0.1.0/midje-mode.el" nil t)
require(midje-mode)
eval((require (quote midje-mode)) nil)
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)

Any ideas why midje-mode doesn't work for me? Does it have anything to do with the fact that I'm using Emacs 24? Thanks. (init.el follows)

=== begin init.el ===

;; from https://github.com/technomancy/clojure-mode

;; add to ~/.emacs.d/init.el if you aren't already using Marmalade.
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)

;=====================================================================
;; GW customizations

(show-paren-mode 1) ;shows matching parens automatically
(delete-selection-mode 1) ; txt operations (e.g., paste) delete seleted text
(recentf-mode 1) ;show recent files in menu

; created my own directory for .el files to be loaded
; (setq load-path (append load-path (list "/Users/gw/.emacs.d/gw-site-lisp")))

;======================================================================

; from https://github.com/marick/Midje/wiki/Midje-mode README.md

(require 'clojure-mode)
(add-to-list 'auto-mode-alist '("\\.clj$" . clojure-mode))
(require 'midje-mode)
(require 'clojure-jump-to-file)

=== end ===