On Fri, Jul 1, 2011 at 8:59 AM, Jeffrey Schwab <je...@schwabcenter.com> wrote:
> Thank you! That is exactly what I needed.
>
> --
> 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
--
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?
> --
> 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
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/
"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)
> If you use lein repl, is there an easy equivalent?
You can set :repl-options [:print clojure.contrib/pprint], but that
depends on pprint being required before the repl launches, and I can't
think of a straightforward way to do that. Perhaps adding an :eval-init
entry in project.clj which can contain needed requires like this?
-Phil
Sean
For the record, I just implemented this, and it will land in Leiningen
1.6.1 in a few days:
https://github.com/technomancy/leiningen/commit/ad2e2111bf60051
-Phil
Hi Phil,
>> You can set :repl-options [:print clojure.contrib/pprint], but that
>> depends on pprint being required before the repl launches, and I
>> can't think of a straightforward way to do that. Perhaps adding an
>> :eval-init entry in project.clj which can contain needed requires
>> like this?
>
> For the record, I just implemented this, and it will land in Leiningen
> 1.6.1 in a few days:
>
> https://github.com/technomancy/leiningen/commit/ad2e2111bf60051
Great, but how do I actually use that? This is my project.clj:
--8<---------------cut here---------------start------------->8---
(defproject funtg "1.0.0-SNAPSHOT"
:description "A library for handling TGraphs. Includes the functional query
language FunQL and the transformation language FunTL."
:repositories { "sonatype"
{ :url "https://oss.sonatype.org/content/repositories/snapshots" } }
:dependencies [[org.clojure/clojure "1.3.0-master-SNAPSHOT"]
[ist/jgralab "[1.0.0,)"]
[ordered "[0.3,)"]]
:dev-dependencies [[swank-clojure "[1.4.0-SNAPSHOT,)"]]
;; AOT-compile my exception classes
:aot [de.uni-koblenz.funtg.exceptions]
;; Don't put version control dirs into the jar
:jar-exclusions [#"(?:^|/).(svn|hg|git)/"]
:warn-on-reflection true
:jvm-opts ["-Xmx2G"]
;; Pretty print results at the REPL
:project-init (require 'clojure.pprint)
:repl-options [:print clojure.pprint/pprint])
--8<---------------cut here---------------end--------------->8---
That does the trick for REPLs fired up with "lein repl", but the REPL I
get in emacs when running M-x clojure-jack-in doesn't pretty-print.
So what do I need to do to enable pretty-printing also in emacs?
Bye,
Tassilo