ag91 / moldable-emacs

Adapting Emacs for moldable development
GNU General Public License v3.0
105 stars 8 forks source link

Add some utilities to the playground #18

Closed alanz closed 2 years ago

alanz commented 2 years ago

As a new user, being told variables area available does not really help much, and it helps to be able to inspect them, somehow.

This is a feeble start on that, and as much to prompt discussion as anything else.

alanz commented 2 years ago

I actually think it would be useful to render the mold-data directly into the commented area in the Playground.

ag91 commented 2 years ago

I really resonate with this: state should be visible. How does it look for very big self and mold-data (CodeAsTree creates big self on average because it tokenizes source code)? I am just slightly worried it will fill the buffer: should we trim?

alanz commented 2 years ago

I was thinking about this a bit. I think self is the only one with a size problem, so maybe not show it by default, blank it out or some such. It would be great to have something like a common-lisp inspector view where you can click on a field to see more detail.

And maybe a poor person's substitute would be to make the playground an org file, with clickable links in it.

ag91 commented 2 years ago

Uhm, what do you think about this project? https://github.com/mmontone/emacs-inspector

https://user-images.githubusercontent.com/6580039/143928686-e94109a5-a5fc-43a4-bab6-4edcf69f8471.mp4

alanz commented 2 years ago

That looks pretty useful

ag91 commented 2 years ago

I am still thinking about this: I wonder if we should work more on the presentation. It could be interesting to split the screen and present an inspector of your current context all the time your cursor is on a mold. Like here: screen-2021-12-02-21-42-13

alanz commented 2 years ago

Looks good. Better than the prior one.

ag91 commented 2 years ago

Okay, finally I got to something that satisfies me: screen-2021-12-26-18-19-16

I changed the UI to store your original windows configuration and always display the original buffer and the final mold (no matter how many composite molds you implicitly invoked). This also shows an inspector that shows the values of self and mold-data.

Could you let me know if that feels good? If so we could close this PR ;)

alanz commented 2 years ago

Sorry for the late reply, time of year and all that.

Yes, it does look good. I could not find the code for your version on your branch, is it available somewhere?

Otherwise merge it, it is a step in the right direction.

alanz commented 2 years ago

nvm, I see it is already on master. And works great.