JonyEpsilon / gorilla-repl

A rich REPL for Clojure in the notebook style.
http://gorilla-repl.org
MIT License
887 stars 104 forks source link

Load as a link #194

Closed puredanger closed 9 years ago

puredanger commented 9 years ago

It would be useful to create webs of linked clj files so that a tutorial could be broken up into pieces (for example).

One way to do this would be to be able to use markdown that created a link that would cause a load of a different file to occur.

k4y3ff commented 9 years ago

Apparently, this is already possible! Try

[Some link](/worksheet.html?filename=src/some_directory/some_other_file.clj)

in Markdown.

The one catch is that, if the Markdown section is set to be editable, you'll have to right click, then select "Open Link in New Tab," as the worksheet will otherwise register the click as you wanting to edit the Markdown, rather than you wanting to follow the link.

JonyEpsilon commented 9 years ago

Yes, the infrastructure for this is already present. If we were to implement the suggestion of read-only markdown segments in #193 then this would work quite nicely, I'd imagine.

JonyEpsilon commented 9 years ago

p.s. One possible snag is that, because Gorilla runs in the context of a particular project, it's only really possible to link worksheets like this if they are in the same project. In practice, this probably isn't much of a limitation though.

puredanger commented 9 years ago

Same project seems totally fine to me and I'm finding this workable as is right now (and would be extra great with read-only segments). Feel free to close!

JonyEpsilon commented 9 years ago

OK, will close this on the understanding that it will get better once read-only segments are working :-)