

Simplistic but fast answer: here’s a quickscript for that: #lang racket/base
(require quickscript
net/sendurl)
(define-script open-url
#:label "open-url"
(λ (selection)
(send-url selection)
#f))
Select the url string in DrRacket, then click on Scripts > open-url and voilà.
A better version would look for the url string automatically at the position of the cursor, but I’ll let that as an exercise (happy to help though)

nice. tyvm

Even if you really want the (right-)click thing, making a quickscript that does the rest will help you test/debug.
To navigate the text editor to automatically select/get the full url string, you can play with the following #lang racket/base
(require quickscript
net/sendurl
racket/class)
(define-script open-url
#:label "open-url"
(λ (selection #:editor ed)
; look for the url in the editor:
(send ed get-start-position)
; etc.
(send-url the-url)
#f))

See also all other methods of text%: https://docs.racket-lang.org/gui/text_.html?q=get-start-position#%28meth._%28%28%28lib._mred%2Fmain..rkt%29._text~25%29._get-start-position%29%29

Robbie has indicated I’ll need to attack this in the colorer in https://github.com/racket/drracket/blob/master/drracket/drracket/private/unit.rkt

I’m wondering how I edit DrRacket in https://github.com/racket/drracket/blob/master/drracket/drracket/private/unit.rkt without editing the instance of DrRacket I’m currently using.

Forking and loading a local copy and running raco pkg install
just gets me % raco pkg install
Linking current directory as a package
raco pkg install: package is currently installed in a wider scope
package: drracket
installed scope: installation
given scope: user
%

Yes, if you want to the click thing, you’ll have to edit the colorer. But before you can get anything done there it’ll take some time and frustration (been there :wink: ), which is why I’d recommend going the quickscript way first, in particular because everything you’ll do in the script you’ll have to do it in the colorer too.

@spdegabrielle Once you’re ready to put your hands in the cranks of DrRacket and the colorer, I highly recommend following this post: https://blog.racket-lang.org/2017/09/tutorial-contributing-to-racket.html

Personally, I have a dev version of racket/DrRacket (with symlinks racket-dev
and drracket-dev
), and a user version. I edit code for the dev version in the user version.

Thats what I’m trying to achieve

currently ‘cloning’

I first cloned racket/racket and compiled it, created the symlinks (also raco-dev
). Then I followed the tutorial for cloning DrRacket

what are the symlinks for?

when you make
it will create binaries in the build subdir. These binaries are racket
, raco
etc. I don’t touch these (as they may be rewritten later), but I have a racket-dev
symlink to the racket
binary, etc. I also have an installed nightly build of racket, which binary is also racket
(but this one is installed globally).

I’m only after an additional instance of drracket
- I’m not delving into raco
or racket
. I’ve followed the instructions for a precompiled version of Racket(7.6 cs): > 1b. If you have a pre-compiled version of Racket … > If you have a compiled version of Racket, i.e. from https://download.racket-lang.org, the following pair of commands makes a clone of the repository for the package *<PKG>
* in the current directory: $ raco pkg update --no-setup --catalog <https://pkgs.racket-lang.org> <PKG>
$ raco pkg update --clone <PKG>
at https://blog.racket-lang.org/2017/09/tutorial-contributing-to-racket.html I’m currently waiting for raco pkg update --clone drracket
to complete. I’m not clear on how I can ‘run’ the cloned instance of DrRacket ?

I’m not clear on how I can ‘run’ the cloned instance of DrRacket ?

raco should automatically update its database, so if you run drracket it should run the cloned one

but switching between the cloned and the base one is going to be tricky AFAICT if you have only one racket installation

Not sure how others do it though

I see now - I didn’t realise thats why you have two racket installations! (three including nightly?)

I don’t have a stable one, only nightly+dev

(although my nightly is often outdated)