-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Executed REPL block #818
Comments
I should also say that I'm up for trying out a PR if you're willing to / interested in doing a lot of hand-holding (on figuring out the back end stuff) |
always keen to onboard people, I'll have a look either later today or tomorrow to point you to how you could do this, here I probably need to get you started as there's some finicky parser things to adjust though it's not very hard as will be obvious when you see the code. One note:
this is already the case, you don't need to name cells the same way, all cells in a page are assumed to be part of the same script so
will basically show
without any additional effort. |
Sounds great! |
alright, this: #819 should give you a good start. The main thing that's missing at a high level is something that splits code into individual blocks (things that in the REPL would be preceded by
should be split into effectively two code blocks I've not tested this and you'd have to add that too. Feel free to ping me from the PR or from a PR you'd open that's inspired by it and we can gradually figure the bits out :) |
btw sorry, the bit you'd have to code in is b902fe8#diff-1067c55b37e9e4106b24ecf530c6565835f5c83ff0ccca6d77c1a08bc7934342R119-R140 |
Hey there! |
So it seems pkg/help/cmd mode are not straightforward to implement according to @tlienart |
No Replay doesn't really help.
a = tempname()
open(a, "w") do outf
redirect_stdout(outf) do
Base.repl_cmd(`ls`, nothing)
end
end
read(a, String) so all of these things are doable at least at some basic level where the use cases shown are simple, the formatting of the output might look a bit different but that's probably acceptable and people can suggest improvements over time. |
That would be awesome, and I'm happy to help. I tried to take a look at #819 but didn't get far, plus it's probably no longer actual. If you can point me at the parts of the code I need to modify, I can try to tackle one of these cases? |
@gdalle I'll try to add the basic stuff to #1035 ; if you'd like to help I think using it and reporting on stuff you'd like / how things could be improved is likely to be most useful. The relevant code that you'd have to look at are:
I'll add soon:
what there will be to do afterwards for which your help would be very welcome
|
Sounds good! I'll subscribe to the PR, whenever it gets updated I'll take it out for a spin :) |
Request
Transferred discussion from slack thread: it would be great to have a feature for code output analogous to to Documenter's
@repl
blocks, where something likeis rendered like
Proposal
As suggested by @tlienart on slack
which I think would be great, presuming we can do multi-line blocks, and connect blocks, eg
renders as
Syntax
I would expect
```?```
to be a help REPL, and```$```
to be shell, so I wouldn't use those. Since!
already has precedent, I think>
would make a lot of sense, though```julia>
would be the most explicit, I think. I also like slightly more explicit, since it will be eventially be easier to edit grammars to enable syntax highlighting for these blocks in markdown files.The text was updated successfully, but these errors were encountered: