Very nice, David! I'll be reading that again in the future, next time I actually need to use enlive.
A couple things I noticed... On Mon, Mar 15, 2010 at 12:43 PM, David Nolen <dnolen.li...@gmail.com> wrote: > > Wow thanks for pointing that out. Turns out that section is way off! It can > be expressed like so: > > (html/deftemplate index "tutorial/template1.html" > [ctxt] > [:p#message] (html/content (get ctxt :message "Nothing to set here")) Did you mean to change "see" to "set"? Also, I'd recommend a slight change to how you load the namespaces. Specifically, I'd recommend doing the load first: (load "scrape1") And then using in-ns to change the REPL's namespace: (in-ns 'tutorial.scrape1) ...mainly because 'ns' is meant to be used as a declaration at the top of a file, not for interactively changing the REPL namespace. There is techincally only a slight difference today (using 'ns' automatically refers all of clojure.core, regardless of what the ns block at the top of the loaded file says), but the differences may drift in the future. I also think reversing the order helps slightly to clarify what's actually going on in the load step -- it's not loading code into your current namespace but into the one declared in "scrape1". Anyway, that's a minor nit -- it's a great tutorial, thanks for writing it up! --Chouser http://joyofclojure.com/ -- 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