Sorry I'm not good at this - some guesses below. HTH

On Mon, Jan 4, 2021 at 7:46 PM Ben Ryjikov <bryji...@gmail.com> wrote:

> I’m sorry - I didn’t explain what kind of highlighting we’re looking for.
>
> We’re building a new #lang, and we want it so that sometimes when you run,
> DrRacket highlights a part of the program you are running.
>

The closest I can think of is debug that shows where you are up to as you
step through the program. (the green triangle in the datalog screenshot
below)
[image: image.png]


> But we only want that in certain situations, so we want to create a
> function which we can call that would do the highlighting on demand.
>
> Are there any functions or libraries which can do that?
>
> We’ve managed to get highlighting through a tool (which is listed in
> info.rkt), but we’re struggling to get it on demand because we can’t easily
> find a way for the tool and the program to share code.
>
> Is there a way for a tool to access code which outside of the tool at
> runtime?
>
> Is dynamic-require the sort of thing you are after?
https://docs.racket-lang.org/reference/Module_Names_and_Loading.html?q=dynamic-require#%28def._%28%28quote._~23~25kernel%29._dynamic-require%29%29



> -Ben
>
> On Jan 4, 2021, at 9:04 AM, Stephen De Gabrielle <spdegabrie...@gmail.com>
> wrote:
>
> On Mon, Jan 4, 2021 at 12:32 AM Ben Ryjikov <bryji...@gmail.com> wrote:
>
>> Hi Racket,
>>
>> Is it possible for a tool invoked by info.rkt to access code which is
>> outside of the tool?
>>
>> We’re building a #lang and would like to have on-demand syntax
>> highlighting.
>> We’ve tried using a tool, and have successfully made a button and a menu
>> item that do it, but we’d like to activate the highlighting
>> programmatically at runtime instead of by clicking on something.
>> We also are hoping to have multiple highlights at once if possible.
>>
>> Is there any way to get on-demand syntax highlighting without using a
>> button or menu item? Are there any pre-existing Racket tools or functions
>> that would do this?
>>
>
> I think datalog does this;
>
> <image.png>
>
>
>
>
>>
>> Thanks for your time and Happy New Year!
>>
>> Best,
>> Ben
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to racket-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/racket-users/BA1B6C4F-8172-462F-9E2D-8F6F2A9C6BB4%40gmail.com
>> .
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAGHj7-LML1OCsaOKDvVn--g13Pe2up082-hTqL3bB1S0mOu7aA%40mail.gmail.com.

Reply via email to