Closed mbutterick closed 7 years ago
This would be great, I agree. I just don't have cycles right now to do it.
One of the pieces seems not to require intimate knowledge of the DrRacket internals, namely adjusting the library syntax-color/module-lexer so that it is parameterized over the namespace (and a separate thread and a custodian and perhaps a security guard to limit filesystem access etc) in such a way that it can be explicitly flushed and a new one loaded.
Similarly, the calls to read-language in drracket/private/module-language are implicitly picking up the environment where DrRacket itself is run. But they shouldn't and once that environment is made explicit, it should be easy to support resetting it to the basic state (and then new versions of the code would be picked up automatically)
Sure. I just wanted to move it to the right location.
Thanks for looking at this. What is the expected behavior? That I should be able to change a DrRacket syntax colorer or indenter, select “Racket → Reload DrRacket extensions”, and the current window will be updated accordingly?
When I use this menu option, I am seeing the code flash (indicating some kind of recoloring is happening) but it still uses the cached colorer / indenter. IOW, I still have to quit & restart DrR to see changes reflected.
I’m testing with this toy language:
https://github.com/mbutterick/beautiful-racket/tree/master/beautiful-racket-demo/jsonic-demo-3
(This ended up being fixed by a commit later than the one mentioned. (And there is another still-outstanding bug that you might see when using the at-exp languages, but I'll get that fixed before too long, I hope.))
After quitting & restarting DrRacket about 50 times yesterday to work on a little indenter, I think I can boil this down to one short-term request that would be a huge help: a menu command that reloads the
get-info
for the current definitions window (i.e., a command that has the same effect as restarting DrR):1) Invalidate the
get-info
cache for that #lang 2) Reload theget-info
for that #lang into the cache 3) Refresh the current definitions window (i.e., repeat the routine DrR performs when you type the name of the #lang, which includes recoloring & loading buttons but not reindenting)