Re: nREPL + Emacs: How to get new definitions to load reliably?

2013-02-23 Thread Karl Smeltzer
 I've added an experimental feature in tools.namespace 0.2.3-SNAPSHOT which
 tries to recover the namespace configuration in your REPL after an error
 during reload. What that hopefully means is you can call `refresh` as you
 normally would even after an error.

I really appreciate you working on this feature!  It does indeed
resolve my difficulties and I'll be using it for all my projects (and
recommending it to others) going forward.  Thanks!

-- 
-- 
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/groups/opt_out.




Re: nREPL + Emacs: How to get new definitions to load reliably?

2013-02-21 Thread Karl Smeltzer
Thanks for that helper function.  I suppose that's as close as I'll
get for the time being.

On Thu, Feb 21, 2013 at 6:03 AM, Stuart Sierra
the.stuart.sie...@gmail.com wrote:
 For what it's worth, I tried using tools.namespace but if I
 (refresh) code that doesn't compile, then suddenly the refresh
 symbol is out of scope and I'm back to square one.


 You can still recover from this: just call 'refresh' by its
 fully-qualified name:

 (clojure.tools.namespace.repl/refresh)

 I use a (hackish) Emacs helper function to do this in nREPL:
 http://bit.ly/WUqLE4


 -S

 --
 --
 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/groups/opt_out.



-- 
-- 
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/groups/opt_out.




nREPL + Emacs: How to get new definitions to load reliably?

2013-02-19 Thread Karl Smeltzer
Suppose I have two namespaces (ns1 and ns2) and the first uses the 
second.  When I load ns1 and switch to its namespace in nREPL, everything 
works as expected.  If I then make changes to existing definitions in ns2 
and reload that file, everything still works as expected.  Finally, when I 
try to add an entirely new definition to ns2, and then reload that file, my 
REPL claims that the new symbol is undefined.  Why is this?

If I go back to the file containing ns1 and reload it, things work again. 
 This is an awkward thing to have to do and I can't imagine there isn't a 
way around it.  

For what it's worth, I tried using tools.namespace but if I (refresh) code 
that doesn't compile, then suddenly the refresh symbol is out of scope and 
I'm back to square one.

Help please!

-- 
-- 
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/groups/opt_out.




Re: nREPL + Emacs: How to get new definitions to load reliably?

2013-02-19 Thread Karl Smeltzer
Thanks for the suggestion, but this doesn't actually seem to solve the 
problem.  This still requires bringing up the file containing the first 
namespace, which is what I want to avoid doing.

On Tuesday, February 19, 2013 1:28:00 PM UTC-8, AtKaaZ wrote:

 you could include a :reload to your :use ns2 in ns1 but I don't recommend 
 it. (it did bit me even with defonce when I wanted to keep some global 
 state but clear it after deftest tests)

 (ns somewhere.namespace1
   (:use [somewhere.namespace2 :as ns2] :reload)) ;;or maybe :reload-all

 I'm sure there's a better way with emacs.


 On Tue, Feb 19, 2013 at 10:16 PM, Karl Smeltzer 
 karl.s...@gmail.comjavascript:
  wrote:

 Suppose I have two namespaces (ns1 and ns2) and the first uses the 
 second.  When I load ns1 and switch to its namespace in nREPL, everything 
 works as expected.  If I then make changes to existing definitions in ns2 
 and reload that file, everything still works as expected.  Finally, when I 
 try to add an entirely new definition to ns2, and then reload that file, my 
 REPL claims that the new symbol is undefined.  Why is this?

 If I go back to the file containing ns1 and reload it, things work again. 
  This is an awkward thing to have to do and I can't imagine there isn't a 
 way around it.  

 For what it's worth, I tried using tools.namespace but if I (refresh) 
 code that doesn't compile, then suddenly the refresh symbol is out of scope 
 and I'm back to square one.

 Help please!

 -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@googlegroups.comjavascript:
 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/groups/opt_out.
  
  




 -- 
 Please correct me if I'm wrong or incomplete,
 even if you think I'll subconsciously hate it.

  

-- 
-- 
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/groups/opt_out.