swank-clojure installation failure via ELPA

49 views
Skip to first unread message

Mike K

unread,
Jan 2, 2010, 9:07:55 AM1/2/10
to Clojure
Hi all,

I'm trying to get all the latest and greatest swank-clojure 1.1.0
goodness via ELPA, but no joy. I'm starting with an absolutely clean
slate. I'm running a freshly installed emacs 23.1.1 on Windows 7. I
have a blank .emacs file and no elpa subdirectory under .emacs.d.

I install elpa and do a package-list-packages. I mark swank-clojure
1.1.0 for installation and install it. I restart emacs and type M-x
slime. I get "[No match]". Package-list-packages indicates that
slime, slime-repl, clojure-mode, and swank-clojure are all installed.
Huh?

Please advise.

Thanks,
Mike

Shawn Hoover

unread,
Jan 2, 2010, 11:13:58 AM1/2/10
to clo...@googlegroups.com
Hi Mike,

Is there anything useful going on in *messages*?

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Mike K

unread,
Jan 2, 2010, 12:35:17 PM1/2/10
to Clojure
On Jan 2, 9:13 am, Shawn Hoover <shawn.hoo...@gmail.com> wrote:
> Hi Mike,
>
> Is there anything useful going on in *messages*?

Here is the contents of *Messages*:

Contacting host: tromey.com:80
Reading [text/plain]... 4k of 4k (100%)
Reading... done.
Reading [text/plain]... 54k of 54k (100%)
Saving file c:/mbk/.emacs.d/elpa/package.el...
Wrote c:/mbk/.emacs.d/elpa/package.el
Loading c:/mbk/.emacs.d/elpa/package.el (source)...done
Saving file c:/mbk/_emacs...
Delete excess backup versions of c:/mbk/_emacs? (y or n)
Wrote c:/mbk/_emacs
Contacting host: tromey.com:80
Reading [text/plain]... 9k of 9k (100%)
Saving file c:/mbk/.emacs.d/elpa/archive-contents...
Wrote c:/mbk/.emacs.d/elpa/archive-contents
Reading [text/plain]... 575 bytes of 563 bytes (102%)
Saving file c:/mbk/.emacs.d/elpa/builtin-packages...
Wrote c:/mbk/.emacs.d/elpa/builtin-packages
Contacting host: tromey.com:80
Reading [text/plain]... 25k of 25k (100%)
Wrote c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode.el
Wrote c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode-pkg.el
Warning: defvar ignored because generated-autoload-file is let-bound
Wrote c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode-autoloads.el
Generating autoloads for clojure-mode-pkg.el...done
Generating autoloads for clojure-mode.el...done
Saving file c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode-
autoloads.el...
Wrote c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode-autoloads.el
(No changes need to be saved)
(No files need saving)
Checking c:/mbk/.emacs.d/elpa/clojure-mode-1.6/... [2 times]
Compiling c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode-
pkg.el...done
Wrote c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode-pkg.elc
Checking c:/mbk/.emacs.d/elpa/clojure-mode-1.6/...
Compiling c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode.el...done
Wrote c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode.elc
Checking c:/mbk/.emacs.d/elpa/clojure-mode-1.6/...
Done (Total of 2 files compiled, 1 skipped)
Contacting host: tromey.com:80
Reading [text/plain]... 347k of 347k (100%)
Wrote c:/mbk/.emacs.d/elpa/slime-20091016/slime.el
Wrote c:/mbk/.emacs.d/elpa/slime-20091016/slime-pkg.el
Wrote c:/mbk/.emacs.d/elpa/slime-20091016/slime-autoloads.el
Generating autoloads for slime-pkg.el...done
hack-local-variables: Local variables entry is missing the suffix


Here is the contents of *Compile-Log*:

Compiling file c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode-
pkg.el at Sat Jan 02 10:30:21 2010

Compiling file c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode.el
at Sat Jan 02 10:30:21 2010

In clojure-mode:
clojure-mode.el:196:34:Warning: reference to free variable `paredit-
mode'
clojure-mode.el:196:51:Warning: reference to free variable `paredit-
version'

In clojure-font-lock-extend-region-def:
clojure-mode.el:232:33:Warning: reference to free variable `font-lock-
beg'
clojure-mode.el:239:30:Warning: assignment to free variable `font-lock-
beg'
clojure-mode.el:240:33:Warning: reference to free variable `font-lock-
end'
clojure-mode.el:242:19:Warning: assignment to free variable `font-lock-
end'

In clojure-font-lock-extend-region-comment:
clojure-mode.el:257:26:Warning: reference to free variable `font-lock-
beg'
clojure-mode.el:254:49:Warning: reference to free variable `font-lock-
end'
clojure-mode.el:258:17:Warning: assignment to free variable `font-lock-
beg'
clojure-mode.el:262:17:Warning: assignment to free variable `font-lock-
end'

In clojure-indent-function:
clojure-mode.el:397:33:Warning: reference to free variable
`calculate-lisp-indent-last-sexp'

In clojure-slime-config:
clojure-mode.el:574:11:Warning: assignment to free variable
`swank-clojure-classpath'

In end of data:
clojure-mode.el:684:1:Warning: the following functions are not known
to be defined:
imenu--generic-function, inferior-lisp-proc, switch-to-lisp,
slime-setup, swank-clojure-slime-mode-hook

Mike

Shawn Hoover

unread,
Jan 2, 2010, 2:18:15 PM1/2/10
to clo...@googlegroups.com
I believe you're running into the same coding issue that I did with ELPA on Windows. slime.el declares in its local variables that it has unix line endings, but ELPA's download process is saving it with windows line endings.

Here's the pseudopatch I submitted to ELPA. You can hack up your .emacs.d/elpa.package.el and then reinstall those packages.

(defun package-write-file-no-coding (file-name excl)
 (setq buffer-file-coding-system 'no-conversion)
 (write-region (point-min) (point-max) file-name nil nil nil excl))

(defun package-unpack-single (file-name version desc requires)
 "Install the contents of the current buffer as a package."
 (let* ((dir (file-name-as-directory package-user-dir)))
   ;; Special case "package".
   (if (string= file-name "package")
-        (write-region (point-min) (point-max) (concat dir file-name ".el")
-                      nil nil nil nil)
+       (package-write-file-no-coding (concat dir file-name ".el") nil)
     (let ((pkg-dir (file-name-as-directory
                     (concat dir file-name "-" version))))
       (make-directory pkg-dir t)
-        (write-region (point-min) (point-max)
-                      (concat pkg-dir file-name ".el")
-                      nil nil nil 'excl)
+       (package-write-file-no-coding (concat pkg-dir file-name ".el") 'excl)


   Mike

Mike K

unread,
Jan 2, 2010, 4:38:26 PM1/2/10
to Clojure
On Jan 2, 12:18 pm, Shawn Hoover <shawn.hoo...@gmail.com> wrote:
> I believe you're running into the same coding issue that I did with ELPA on
> Windows. slime.el declares in its local variables that it has unix line
> endings, but ELPA's download process is saving it with windows line endings.
>
> Here's the pseudopatch I submitted to ELPA. You can hack up your
> .emacs.d/elpa.package.el and then reinstall those packages.

That did the trick, but now I have another question. How do I set up
additional entries on my classpath now that I've installed via elpa
and moved to 1.1.0?

I used to do something like the following:

(swank-clojure-config

;; ...

(setq swank-clojure-extra-classpaths (list

;; ...
)
)
)

However, swank-clojure-config is no longer recognized.

Mike

Phil Hagelberg

unread,
Jan 2, 2010, 4:42:59 PM1/2/10
to clo...@googlegroups.com
Mike K <mbk....@gmail.com> writes:

> That did the trick, but now I have another question. How do I set up
> additional entries on my classpath now that I've installed via elpa
> and moved to 1.1.0?

Check the swank-clojure readme. What you're probably looking for is M-x
swank-clojure-project.

-Phil

Mike K

unread,
Jan 2, 2010, 5:06:06 PM1/2/10
to Clojure
I'm up and running again. Thank you very much Shawn and Phil!

Phil: For the sake of other Windows users, I suggest adding a pointer
to the patched package.el in the readme until the issue is resolved.

Mike

Reply all
Reply to author
Forward
0 new messages