On Aug 10, 2:19 pm, Mike Meyer <mwm-keyword-googlegroups.
620...@mired.org> wrote:
> On Tue, 10 Aug 2010 09:57:02 -0700 (PDT)
>
> Alexis Rondeau <alexis.rond...@gmail.com> wrote:
> > What I would like to do is to enable clojure-mode when I get my REPL
> > (connected either via swank-clojure-project or lein swank/M-x slime-
> > connect) but whenever I do M-x clojure-mode, the REPL stops (I think)
> > evaluating. While the syntax highlighting does take effect, writing an
> > expression and pressing Enter yields nothing. The message I get is
> > 'Buffer is read-only".
>
> I think you're wanting something that's not possible. Not very
> desirable, for that matter.
>
> The repl buffer is a nice tool for communicating with a running
> clojure, so it binds Enter to slime-repl-return, which evaluates the
> current input string. clojure-mode is meant for editing clojure code,
> so it binds Enter to newline-and-indent-relative, to make it easy to
> type the next line in your clojure program. Turning on clojure-mode in
> the repl rebinds Enter (and probably other things), thus breaking them
> in the repl.
>
> While you could write a mode that did what you want, I don't think
> anyone has done it yet. The issue is that code you edit in the repl
> isn't saved anywhere if the repl exits. Normally, you create a file
> for your clojure code, and edit that in clojure mode. That gives you
> commands to send functions (and etc.)  to the repl so you can test
> them.
>

I hadn't thought about my problem this way, thank you very much. I do
think for a beginner the repl is just so attractive because of the
immediate feedback loop. And syntax highlighting, while it's of course
possible without, helps me as a beginner making sense of learning
syntax. But, yes, totally: If I were to go from personal
experimentation-mode (in the repl) to an actual project, I do want to
write to file instead.

>         <mike
> --
> Mike Meyer <m...@mired.org>          http://www.mired.org/consulting.html
> Independent Network/Unix/Perforce consultant, email for more information.
>
> O< ascii ribbon campaign - stop html mail -www.asciiribbon.org

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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