Hi Mark,

On Wed, Dec 31, 2008 at 4:44 PM, Mark Hoemmen <mark.hoem...@gmail.com> wrote:
> I've been having trouble with Emacs + SLIME + Clojure.  I've been
> using Bill Clementson's setup, and it was working when I fetched all
> the required projects via his clj-build script.  However, when I
> fetched new versions using this script yesterday, Emacs gave me the
> following error when I ran "run-clojure":
>
> error in process filter: Symbol's function definition is void:
> slime-redirect-inferior-output
>
> I get an *inferior-lisp* buffer that works (is hooked to Clojure), and
> I can evaluate Clojure buffers, but I don't get a SLIME REPL buffer,
> nor does syntax highlighting work (I made sure that font-lock-mode is
> set).  All of those things worked before.  I'm attaching a file
> containing the relevant part of my .emacs file.  The trouble seems to
> be near the end, where the hook after slime connects calls
> "slime-redirect-inferior-output".  I can't find this function anywhere
> in SLIME or in clojure-swank.  If I comment out this call, I get
> another error saying that
>
> error in process filter: Symbol's value as variable is void: 
> slime-repl-mode-map
>
> and the troubles stay.  Anybody know how I could work around the
> problem or even fix it altogether?

There are currently some "breaking" refactorings that are being done
to slime. The slime repl has been moved out to the contribs directory
and has to now be explicitly specified when you startup slime.
However, the necessary changes to swank-clojure haven't been made yet.
Therefore, you can do one of a number of things:

1. Don't upgrade to any slime later than December 22. This is your
easiest option at the moment. Jeffrey Chou usually updates
swank-clojure pretty quickly when there are bugs or slime changes, so
it shouldn't be too long before you can start using the latest cvs
slime once again.
2. Use an alternative repl with slime. There are actually 3 different
repl's that you can potentially use with slime:
a. The inferior-lisp repl that starts up when you launch slime (before
Dec 23, it would launch the slime-repl automatically after
establishing communications with the underlying Lisp implementation
(Clojure in your case). However, post-Dec 23, it will only optionally
launch the slime-repl).
b. An enhanced inferior-lisp repl that has most of the key bindings
that are available in the "normal" slime repl. To enable this, modify
your startup to use this line:
(slime-setup '(inferior-slime))
instead of the:
(slime-setup)
line that was in my setup instructions.
c. The "normal" slime-repl that has all the bells & whistles (you
can't use this one at the moment with the latest slime cvs code)
3. Use an alternative to slime for the time being. I suggested one
emacs alternative in a weblog post:
http://bc.tech.coop/blog/081118.html

If you go with #1, then you don't have to change your setup. If you go
with #3, then you lose much of the functionality which you may have
grown accustomed to having with slime. If you go with #2a or #2b, you
will have to comment out (or remove) any mods that directly reference
the slime-repl mode (which is created when 2.c is started up and which
is the one that is started automatically by pre-Dec23 versions of
slime). In your specific case, you will have to comment out lines in
your setup as follows:
(add-hook 'slime-connected-hook (lambda ()
                                  ;(slime-redirect-inferior-output)
                                  (define-key slime-mode-map (kbd "<return>") 
'newline-and-indent)
                                  (define-key slime-mode-map (kbd "C-j") 
'newline)
                                  (define-key slime-mode-map (kbd "C-c b") 
'slime-browse-local-javadoc)
                                  ;(define-key slime-repl-mode-map (kbd "C-c b")
'slime-browse-local-javadoc)
                                  (define-key slime-mode-map (kbd "C-c d") 
'slime-java-describe)
                                  ;(define-key slime-repl-mode-map (kbd "C-c 
d") 'slime-java-describe)
                                  (define-key slime-mode-map (kbd "C-c D") 
'slime-javadoc)
                                  ;(define-key slime-repl-mode-map (kbd "C-c 
D") 'slime-javadoc)
                                  ))

You could change the slime-repl-mode-map entries to instead refer to
the equivalent inferior-lisp repl mode map; however, you'll just have
to change them back again when slime-repl becomes available again.

So, I recommend you stick with #1 until swank-clojure is updated as
necessary. The slime-repl has more features/functionality than the
inferior-lisp repl alternatives.

Hope that helps and that my explanation wasn't more information than
you really wanted. ;-)

--
Bill Clementson

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to