[ANN] A guide to setup test driven workflow for Clojure

2014-09-27 Thread suvash
Hi friends,

I have just posted a guide to setup a test driven workflow for Clojure, the 
idea being able to have a workflow where one does not have to leave the 
editor to execute tests as the files are modified.
It is posted at http://suva.sh/2014/10/27/test-workflow-setup-for-clojure/

I hope this comes of use to somebody else as well, as I've been quite 
bummed to not have run into a tutorial as such.

Please feel free to discuss it at reddit / HN as you will.
https://news.ycombinator.com/item?id=8377951
http://www.reddit.com/r/Clojure/comments/2hn8u2/a_guide_to_setup_test_driven_workflow_for_clojure/

Thanks
#suvash

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] A guide to setup test driven workflow for Clojure

2014-10-22 Thread tao.zhou2009
(defun cider-repl-command (cmd) "Execute commands on the cider repl" 
(cider-switch-to-repl-buffer) (goto-char (point-max)) (insert cmd) 
(cider-repl-return) (cider-switch-to-last-clojure-buffer)) (defun 
cider-repl-reset () "Assumes reloaded + tools.namespace is used to reload 
everything" (interactive) (save-some-buffers) (cider-repl-command 
"(user/reset)")) (defun cider-reset-test-run-tests () (interactive) 
(cider-repl-reset) (cider-test-run-tests)) (define-key cider-mode-map (kbd "C-c 
r") 'cider-repl-reset) (define-key cider-mode-map (kbd "C-c .") 
'cider-reset-test-run-tests)


I append the above elisp code to ~/.emacs.d/init.el and restart Emacs:

Warning (initialization): An error occurred while loading 
`/Users/tao/.emacs.d/init.el':

Symbol's value as variable is void: cider-mode-map

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the `--debug-init' option to view a complete error backtrace.



what’s the reason about this error? how do you use the above elisp code ?

I use Prelude: http://batsov.com/prelude/  

--  
tao.zhou2009
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Wednesday, October 1, 2014 at 7:09 PM, tao.zhou2009 wrote:

> Thanks for James Reeves’s great project:  
> https://github.com/weavejester/ns-tracker
> --  
> tao.zhou2009
> Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
>  
>  
> On Tuesday, September 30, 2014 at 5:13 AM, suvash wrote:
>  
> > ns-tracker seems to be pretty neat too. Thanks for letting me know.
> >  
> > On Monday, September 29, 2014 3:57:20 AM UTC+2, Tao Zhou wrote:
> > > just use: https://github.com/weavejester/ns-tracker,
> > >  
> > > (ns xxx.repl)
> > >  
> > > (def modified-namespaces (ns-tracker ["src" "test"]))
> > >  
> > > (defn reload []
> > >   (doseq [ns-sym (modified-namespaces)]
> > > (require ns-sym :reload)))
> > >  
> > >  
> > > and in project.clj
> > >  
> > >  :repl-options  {:init-ns xxx.repl}
> > >  
> > > when modified files, just (reload) in a open REPL.
> > >  
> > >  
> > > --  
> > > tao.zhou2009
> > > Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
> > >  
> > >  
> > > On Monday, September 29, 2014 at 7:16 AM, Colin Williams wrote:
> > >  
> > > > This seems cool, my approach isn't nearly as sophisticated and much 
> > > > more editor dependent.  I've using prelude, which include projectile, 
> > > > which binds C-c p P to projectile-test-project.
> > > >  
> > > > There were a couple customizations I had to make to get it really 
> > > > streamlined, though.  The command shows up in the compile prompt, but I 
> > > > can get rid of that by customizing compilation-read-command to nil.  It 
> > > > doesn't save when this variable is nil, so I bound a keyboard macro to 
> > > > F6: [?\s-p ?S ?\s-p ?P]
> > > >  
> > > > On Saturday, September 27, 2014 5:43:05 PM UTC-4, suvash wrote:
> > > > > Hi friends,
> > > > >  
> > > > > I have just posted a guide to setup a test driven workflow for 
> > > > > Clojure, the idea being able to have a workflow where one does not 
> > > > > have to leave the editor to execute tests as the files are modified.
> > > > > It is posted at 
> > > > > http://suva.sh/2014/10/27/test-workflow-setup-for-clojure/
> > > > >  
> > > > > I hope this comes of use to somebody else as well, as I've been quite 
> > > > > bummed to not have run into a tutorial as such.
> > > > >  
> > > > > Please feel free to discuss it at reddit / HN as you will.
> > > > > https://news.ycombinator.com/item?id=8377951
> > > > > http://www.reddit.com/r/Clojure/comments/2hn8u2/a_guide_to_setup_test_driven_workflow_for_clojure/
> > > > >  
> > > > >  
> > > > > Thanks
> > > > > #suvash
> > > > >  
> > > >  
> > > >  
> > > >  
> > > >  
> > > > --  
> > > > 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 
> > > > (javascript:)
> > > > 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 (javascript:)
> > > > For more options, visit this group at
> > > > http://groups.google.com/group/clojure?hl=en
> > > > ---  
> > > > You received this message because you are subscribed to the Google 
> > > > Groups "Clojure" group.
> > > > To unsubscribe from this group and stop receiving emails from it, send 
> > > > an email to clojure+u...@googlegroups.com (javascript:).
> > > > For more options, visit https://groups.google.com/d/optout.
> > >  
> > --  
> > 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 
> > (mailto:clojure@googlegroups.com)
> > Note that posts from new members are moderated - please be patient with 
> > your first post.
> > To unsubscribe from this

Re: [ANN] A guide to setup test driven workflow for Clojure

2014-09-28 Thread Colin Williams
This seems cool, my approach isn't nearly as sophisticated and much more 
editor dependent.  I've using prelude, which include projectile, which 
binds C-c p P to projectile-test-project.

There were a couple customizations I had to make to get it really 
streamlined, though.  The command shows up in the compile prompt, but I can 
get rid of that by customizing compilation-read-command to nil.  It doesn't 
save when this variable is nil, so I bound a keyboard macro to F6: [?\s-p 
?S ?\s-p ?P]

On Saturday, September 27, 2014 5:43:05 PM UTC-4, suvash wrote:
>
> Hi friends,
>
> I have just posted a guide to setup a test driven workflow for Clojure, 
> the idea being able to have a workflow where one does not have to leave the 
> editor to execute tests as the files are modified.
> It is posted at http://suva.sh/2014/10/27/test-workflow-setup-for-clojure/
>
> I hope this comes of use to somebody else as well, as I've been quite 
> bummed to not have run into a tutorial as such.
>
> Please feel free to discuss it at reddit / HN as you will.
> https://news.ycombinator.com/item?id=8377951
>
> http://www.reddit.com/r/Clojure/comments/2hn8u2/a_guide_to_setup_test_driven_workflow_for_clojure/
>
> Thanks
> #suvash
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] A guide to setup test driven workflow for Clojure

2014-09-28 Thread tao.zhou2009
just use: https://github.com/weavejester/ns-tracker,

(ns xxx.repl)

(def modified-namespaces (ns-tracker ["src" "test"]))

(defn reload []
  (doseq [ns-sym (modified-namespaces)]
(require ns-sym :reload)))


and in project.clj

 :repl-options  {:init-ns xxx.repl}

when modified files, just (reload) in a open REPL.


-- 
tao.zhou2009
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Monday, September 29, 2014 at 7:16 AM, Colin Williams wrote:

> This seems cool, my approach isn't nearly as sophisticated and much more 
> editor dependent.  I've using prelude, which include projectile, which binds 
> C-c p P to projectile-test-project.
> 
> There were a couple customizations I had to make to get it really 
> streamlined, though.  The command shows up in the compile prompt, but I can 
> get rid of that by customizing compilation-read-command to nil.  It doesn't 
> save when this variable is nil, so I bound a keyboard macro to F6: [?\s-p ?S 
> ?\s-p ?P]
> 
> On Saturday, September 27, 2014 5:43:05 PM UTC-4, suvash wrote:
> > Hi friends,
> > 
> > I have just posted a guide to setup a test driven workflow for Clojure, the 
> > idea being able to have a workflow where one does not have to leave the 
> > editor to execute tests as the files are modified.
> > It is posted at http://suva.sh/2014/10/27/test-workflow-setup-for-clojure/
> > 
> > I hope this comes of use to somebody else as well, as I've been quite 
> > bummed to not have run into a tutorial as such.
> > 
> > Please feel free to discuss it at reddit / HN as you will.
> > https://news.ycombinator.com/item?id=8377951
> > http://www.reddit.com/r/Clojure/comments/2hn8u2/a_guide_to_setup_test_driven_workflow_for_clojure/
> > 
> > 
> > Thanks
> > #suvash
> > 
> 
> 
> 
> 
> -- 
> 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 
> (mailto: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 
> (mailto:clojure+unsubscr...@googlegroups.com)
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com 
> (mailto:clojure+unsubscr...@googlegroups.com).
> For more options, visit https://groups.google.com/d/optout.

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] A guide to setup test driven workflow for Clojure

2014-09-29 Thread suvash
ns-tracker seems to be pretty neat too. Thanks for letting me know.

On Monday, September 29, 2014 3:57:20 AM UTC+2, Tao Zhou wrote:
>
> just use: https://github.com/weavejester/ns-tracker,
>
> (ns xxx.repl)
>
> (def modified-namespaces (ns-tracker ["src" "test"]))
>
> (defn reload []
>   (doseq [ns-sym (modified-namespaces)]
> (require ns-sym :reload)))
>
> and in project.clj
>
>  :repl-options  {:init-ns xxx.repl}
>
> when modified files, just (reload) in a open REPL.
>
>
> -- 
> tao.zhou2009
> Sent with Sparrow 
>
> On Monday, September 29, 2014 at 7:16 AM, Colin Williams wrote:
>
> This seems cool, my approach isn't nearly as sophisticated and much more 
> editor dependent.  I've using prelude, which include projectile, which 
> binds C-c p P to projectile-test-project.
>
> There were a couple customizations I had to make to get it really 
> streamlined, though.  The command shows up in the compile prompt, but I can 
> get rid of that by customizing compilation-read-command to nil.  It doesn't 
> save when this variable is nil, so I bound a keyboard macro to F6: [?\s-p 
> ?S ?\s-p ?P]
>
> On Saturday, September 27, 2014 5:43:05 PM UTC-4, suvash wrote:
>
> Hi friends,
>
> I have just posted a guide to setup a test driven workflow for Clojure, 
> the idea being able to have a workflow where one does not have to leave the 
> editor to execute tests as the files are modified.
> It is posted at http://suva.sh/2014/10/27/test-workflow-setup-for-clojure/
>
> I hope this comes of use to somebody else as well, as I've been quite 
> bummed to not have run into a tutorial as such.
>
> Please feel free to discuss it at reddit / HN as you will.
> https://news.ycombinator.com/item?id=8377951
>
> http://www.reddit.com/r/Clojure/comments/2hn8u2/a_guide_to_setup_test_driven_workflow_for_clojure/
>
> Thanks
> #suvash
>
>  -- 
> 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
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+u...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>  
>  
>  

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] A guide to setup test driven workflow for Clojure

2014-10-01 Thread tao.zhou2009
Thanks for James Reeves’s great project:  
https://github.com/weavejester/ns-tracker
--  
tao.zhou2009
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Tuesday, September 30, 2014 at 5:13 AM, suvash wrote:

> ns-tracker seems to be pretty neat too. Thanks for letting me know.
>  
> On Monday, September 29, 2014 3:57:20 AM UTC+2, Tao Zhou wrote:
> > just use: https://github.com/weavejester/ns-tracker,
> >  
> > (ns xxx.repl)
> >  
> > (def modified-namespaces (ns-tracker ["src" "test"]))
> >  
> > (defn reload []
> >   (doseq [ns-sym (modified-namespaces)]
> > (require ns-sym :reload)))
> >  
> >  
> > and in project.clj
> >  
> >  :repl-options  {:init-ns xxx.repl}
> >  
> > when modified files, just (reload) in a open REPL.
> >  
> >  
> > --  
> > tao.zhou2009
> > Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
> >  
> >  
> > On Monday, September 29, 2014 at 7:16 AM, Colin Williams wrote:
> >  
> > > This seems cool, my approach isn't nearly as sophisticated and much more 
> > > editor dependent.  I've using prelude, which include projectile, which 
> > > binds C-c p P to projectile-test-project.
> > >  
> > > There were a couple customizations I had to make to get it really 
> > > streamlined, though.  The command shows up in the compile prompt, but I 
> > > can get rid of that by customizing compilation-read-command to nil.  It 
> > > doesn't save when this variable is nil, so I bound a keyboard macro to 
> > > F6: [?\s-p ?S ?\s-p ?P]
> > >  
> > > On Saturday, September 27, 2014 5:43:05 PM UTC-4, suvash wrote:
> > > > Hi friends,
> > > >  
> > > > I have just posted a guide to setup a test driven workflow for Clojure, 
> > > > the idea being able to have a workflow where one does not have to leave 
> > > > the editor to execute tests as the files are modified.
> > > > It is posted at 
> > > > http://suva.sh/2014/10/27/test-workflow-setup-for-clojure/
> > > >  
> > > > I hope this comes of use to somebody else as well, as I've been quite 
> > > > bummed to not have run into a tutorial as such.
> > > >  
> > > > Please feel free to discuss it at reddit / HN as you will.
> > > > https://news.ycombinator.com/item?id=8377951
> > > > http://www.reddit.com/r/Clojure/comments/2hn8u2/a_guide_to_setup_test_driven_workflow_for_clojure/
> > > >  
> > > >  
> > > > Thanks
> > > > #suvash
> > > >  
> > >  
> > >  
> > >  
> > >  
> > > --  
> > > 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 (javascript:)
> > > 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 (javascript:)
> > > For more options, visit this group at
> > > http://groups.google.com/group/clojure?hl=en
> > > ---  
> > > You received this message because you are subscribed to the Google Groups 
> > > "Clojure" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an 
> > > email to clojure+u...@googlegroups.com (javascript:).
> > > For more options, visit https://groups.google.com/d/optout.
> >  
> --  
> 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 
> (mailto: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 
> (mailto:clojure+unsubscr...@googlegroups.com)
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---  
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com 
> (mailto:clojure+unsubscr...@googlegroups.com).
> For more options, visit https://groups.google.com/d/optout.

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.