I'll let others comment further on your general workflow, but I do
think you have a fundamental misunderstanding about the browser repl.

The browser repl is directly connected to the browser, so you don't
need to refresh the page to see changes you're making at the browse
repl. In fact, if you refresh the page, the browser repl's state is
lost and the js state is reset to the base compiled files.

Now with nrepl's ability to have multiple sessions open at once (an
ability I haven't taken any advantage of personally), you should be
able to have a JVM nrepl open _and_ a browser repl nrepl session, both
of which would be modifying client and server sides of the code
respectively.

When thinking about the browser repl, I find it best to think in terms
of the browser tab being the JVM. If the browser tab goes down, I
loose all my state without recompiling the file, which involves either
running it through the compilation phase of gclosure or reconnecting
and reloading the files.

On Sun, Sep 29, 2013 at 10:24 PM, George Oliver
<georgeolive...@gmail.com> wrote:
> I sent this to Clojure-tools before I realized that list is not really for
> support questions, apologies for the crosspost.
>
> I'm hoping someone can help me fit the missing piece in this workflow:
>
> (this works)
>
> 1. nrepl-jack-in in Emacs
> 2. launch web server from nrepl, modify Clojure files and reload (C-c C-k),
> refresh browser to see changes
> 3. launch browser repl from Emacs nrepl, connect it to the browser (using
> Austin [0], works great)
>
> (this doesn't work)
>
> 4. while connected with browser repl, modify Clojure files and reload,
> refresh browser to see changes
>
> All with the goal of being able to reload server-side code and also have the
> live browser repl to interact with the client-side.
>
> So far step 4 seems to reload Clojure code into the Clojurescript repl,
> obviously this won't work.
>
> I tried to connect two nrepl sessions to the same nrepl server following
> this thread [1] as so:
>
>>  1) call nrepl-jack-in to start a server
>>  2) get *nrepl* buffer for Clojure session
>>  3) connect to the same server once more to get *nrepl*<2>
>>  4) rename it to *cljs-repl*
>>  5) make nrepl-nrepl-buffer local
>>  6) set value of nrepl-nrepl-buffer to *cljs-repl* in cljs buffers
>
> I got everything up to (5), but setting nrepl-repl-buffer (I think that's
> what he meant ??) buffer local to my cljs file then doing step 6 didn't have
> any effect. I don't know much of elisp or Emacs though so I'm not sure if I
> followed those steps correctly.
>
> There have been some recent threads on this topic [2] but no complete
> solution as far as I can tell.
>
>
> thanks for any help,
>
> George
>
>
>
> [0] https://github.com/cemerick/austin
> [1] https://groups.google.com/forum/#!topic/clojure-tools/C0jND-uuV28
> [2] https://groups.google.com/forum/#!topic/clojure-tools/aCk59YTUV_I
>
>
> --
> --
> 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.

Reply via email to