Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Emacs+SLIME+Clojure troubles
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  13 messages - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mark Hoemmen  
View profile  
 More options Dec 31 2008, 7:44 pm
From: "Mark Hoemmen" <mark.hoem...@gmail.com>
Date: Wed, 31 Dec 2008 16:44:41 -0800
Local: Wed, Dec 31 2008 7:44 pm
Subject: Emacs+SLIME+Clojure troubles

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?

mfh

  emacs.clojure
5K Download

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Clementson  
View profile  
 More options Dec 31 2008, 9:38 pm
From: "Bill Clementson" <billc...@gmail.com>
Date: Wed, 31 Dec 2008 18:38:44 -0800
Local: Wed, Dec 31 2008 9:38 pm
Subject: Re: Emacs+SLIME+Clojure troubles
Hi Mark,

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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Remco van 't Veer  
View profile  
 More options Jan 1, 8:55 am
From: "Remco van 't Veer" <rwvtv...@gmail.com>
Date: Thu, 1 Jan 2009 14:55:38 +0100
Local: Thurs, Jan 1 2009 8:55 am
Subject: Re: Emacs+SLIME+Clojure troubles
I got repl to start with a small change to swank-clojure:

  http://github.com/remvee/swank-clojure/commit/ed89d6997bce3c5076e779a...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Clementson  
View profile  
(1 user)  More options Jan 1, 2:40 pm
From: "Bill Clementson" <billc...@gmail.com>
Date: Thu, 1 Jan 2009 11:40:53 -0800
Local: Thurs, Jan 1 2009 2:40 pm
Subject: Re: Emacs+SLIME+Clojure troubles
Yes, this does work too. I'll forward on your patch to Jeffrey.

Thanks,
Bill

On Thu, Jan 1, 2009 at 5:55 AM, Remco van 't Veer <rwvtv...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Clementson  
View profile  
 More options Jan 1, 2:44 pm
From: "Bill Clementson" <billc...@gmail.com>
Date: Thu, 1 Jan 2009 11:44:07 -0800
Local: Thurs, Jan 1 2009 2:44 pm
Subject: Re: Emacs+SLIME+Clojure troubles
It should be noted that (in order to use the new slime-repl mods (if
you download the latest slime and apply Remco's patch), you will have
to modify your .emacs startup to include the following:
(slime-setup '(slime-repl))

- Bill


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark H.  
View profile  
 More options Jan 1, 4:05 pm
From: "Mark H." <mark.hoem...@gmail.com>
Date: Thu, 1 Jan 2009 13:05:45 -0800 (PST)
Local: Thurs, Jan 1 2009 4:05 pm
Subject: Re: Emacs+SLIME+Clojure troubles
On Jan 1, 5:55 am, "Remco van 't Veer" <rwvtv...@gmail.com> wrote:

> I got repl to start with a small change to swank-clojure:

>  http://github.com/remvee/swank-clojure/commit/ed89d6997bce3c5076e779a...

I changed that one line to say

(defslimefn create-repl [target] '(user user))

and the SLIME repl works, but the following exception is thrown
whenever the dynamic documentation for a function would be displayed:

java.lang.Exception: Unable to resolve symbol: user in this context
(NO_SOURCE_FILE:
0)
  [Thrown class clojure.lang.Compiler$CompilerException]

Once I dismiss the exception, the repl itself works fine.

Thanks y'all!
mfh


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen C. Gilardi  
View profile  
 More options Jan 1, 6:44 pm
From: "Stephen C. Gilardi" <squee...@mac.com>
Date: Thu, 01 Jan 2009 18:44:29 -0500
Local: Thurs, Jan 1 2009 6:44 pm
Subject: Re: Emacs+SLIME+Clojure troubles

On Jan 1, 2009, at 4:05 PM, Mark H. wrote:

> Once I dismiss the exception, the repl itself works fine.

> Thanks y'all!

I don't know how to fix it, but it appears to be related to the  
synchronization of the notion of the current namespace between swank  
and slime. This incantation works around it:

        ; SLIME 2009-01-01
        user> (in-ns 'junk)
        #<Namespace junk>
        junk> (in-ns 'user)
        #<Namespace user>
        user>

After the first call, documentation is displayed correctly without an  
exception being thrown. The second call restores us to the user  
namespace.

--Steve

  smime.p7s
3K Download

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Clementson  
View profile  
 More options Jan 1, 7:57 pm
From: "Bill Clementson" <billc...@gmail.com>
Date: Thu, 1 Jan 2009 16:57:32 -0800
Local: Thurs, Jan 1 2009 7:57 pm
Subject: Re: Emacs+SLIME+Clojure troubles

After downloading the latest slime and applying Remco's patch and
modifying my .emacs file, I haven't been able to replicate this
particular error. When you say that the "exception is thrown whenever
the dynamic documentation for a function would be displayed", are you
saying that the exception is occurring when you press "C-c C-d C-d" on
a function name? It works fine for me. Or is there some other "dynamic
documentation for a function" that you're referring to?

- Bill


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen C. Gilardi  
View profile  
 More options Jan 1, 8:44 pm
From: "Stephen C. Gilardi" <squee...@mac.com>
Date: Thu, 01 Jan 2009 20:44:35 -0500
Local: Thurs, Jan 1 2009 8:44 pm
Subject: Re: Emacs+SLIME+Clojure troubles

On Jan 1, 2009, at 7:57 PM, Bill Clementson wrote:

> Or is there some other "dynamic
> documentation for a function" that you're referring to?

For me, it throws the exception when I type a space and SLIME tries to  
look up the arguments for the current function. For example, in a  
fresh SLIME repl:

user> (a

On typing a space after the "(a", the exception is thrown:

java.lang.Exception: Unable to resolve symbol: user in this context  
(NO_SOURCE_FILE:0)
   [Thrown class clojure.lang.Compiler$CompilerException]

--Steve

  smime.p7s
3K Download

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark H.  
View profile  
 More options Jan 1, 9:02 pm
From: "Mark H." <mark.hoem...@gmail.com>
Date: Thu, 1 Jan 2009 18:02:45 -0800 (PST)
Local: Thurs, Jan 1 2009 9:02 pm
Subject: Re: Emacs+SLIME+Clojure troubles
On Jan 1, 5:44 pm, "Stephen C. Gilardi" <squee...@mac.com> wrote:

> On Jan 1, 2009, at 7:57 PM, Bill Clementson wrote:

> > Or is there some other "dynamic
> > documentation for a function" that you're referring to?

> For me, it throws the exception when I type a space and SLIME tries to  
> look up the arguments for the current function.

That's what I mean -- I should have been more specific.  Oddly enough,
the online documentation works fine when I'm coding in a non-REPL
buffer (it doesn't throw an exception then), nor do I get an exception
when I use C-c C-e to evaluate a one-line Clojure expression.

I'll refetch everything, apply the Swank patch and try again --

mfh


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Clementson  
View profile  
 More options Jan 1, 9:48 pm
From: "Bill Clementson" <billc...@gmail.com>
Date: Thu, 1 Jan 2009 18:48:01 -0800
Local: Thurs, Jan 1 2009 9:48 pm
Subject: Re: Emacs+SLIME+Clojure troubles

Looks like the correct patch to basic.clj should be:
(defslimefn create-repl [target] '("user" user))

- Bill


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen C. Gilardi  
View profile  
 More options Jan 1, 9:59 pm
From: "Stephen C. Gilardi" <squee...@mac.com>
Date: Thu, 01 Jan 2009 21:59:18 -0500
Local: Thurs, Jan 1 2009 9:59 pm
Subject: Re: Emacs+SLIME+Clojure troubles

On Jan 1, 2009, at 9:48 PM, Bill Clementson wrote:

> Looks like the correct patch to basic.clj should be:
> (defslimefn create-repl [target] '("user" user))

That works great for me. Thanks very much!

--Steve

  smime.p7s
3K Download

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark H.  
View profile  
 More options Jan 1, 11:39 pm
From: "Mark H." <mark.hoem...@gmail.com>
Date: Thu, 1 Jan 2009 20:39:03 -0800 (PST)
Local: Thurs, Jan 1 2009 11:39 pm
Subject: Re: Emacs+SLIME+Clojure troubles
On Jan 1, 6:48 pm, "Bill Clementson" <billc...@gmail.com> wrote:

> Looks like the correct patch to basic.clj should be:
> (defslimefn create-repl [target] '("user" user))

That fixes everything -- thank you :-D

mfh


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google