DrRacket caret blink

110 views
Skip to first unread message

Mark

unread,
Nov 28, 2020, 5:54:39 AM11/28/20
to Racket Users
I've just downloaded and installed Racket to try it out.

But on both Linux and Windows the caret blinks inside DrRacket which makes it unusable for me.

Is it possible to stop the blinking?

On Windows I've set the system-wide caret not to blink and every other Windows program I've used respects this (except for Tcl/Tk's ttk widgets). On Linux it is trickier since I have to switch it off separately for Gtk, Qt, .Xdefaults, and .gvimrc,  but apart from login (lightdm to Xfce) I never see any blinking.

I realise that most people _like_ caret blink and find it useful: but I'm not alone in not being able to work with it. See, e.g., https://jurta.org/en/prog/noblink

I guess in the meantime I'll keep reading the racket docs and try it using vim.

Tim Meehan

unread,
Nov 28, 2020, 12:10:07 PM11/28/20
to Mark, Racket Users
I'm not sure how to disable cursor blink in DrRacket, but your installation comes with a few other executables that are text only - such as "gracket-text" the cursor does not blink on my installation (MacOS, Racket 7.9 (bc))

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/d72b60c5-c9c7-44e4-8e56-f2df4a5e1b46n%40googlegroups.com.

Mark

unread,
Nov 28, 2020, 3:10:53 PM11/28/20
to Racket Users
I didn't know about that tool, I'll use it as I learn. Thanks!
(But it is still a pity that there's no config option to turn off blinking in DrRacket.)

Philip McGrath

unread,
Nov 28, 2020, 3:49:39 PM11/28/20
to Mark, Racket Users
On Sat, Nov 28, 2020 at 3:10 PM 'Mark' via Racket Users <racket...@googlegroups.com> wrote:
(But it is still a pity that there's no config option to turn off blinking in DrRacket.)

I agree that this would be a valuable feature to add, not just to DrRacket but to `racket/gui` in general. It seems the blinking behavior is controlled with a hard-coded interval here: https://github.com/racket/gui/blob/aa5ebfec7402bdcbc3813f822caedb4a3ceb2c4c/gui-lib/mred/private/wxme/editor-canvas.rkt#L84-L104 Probably the hard part of a solution would be detecting the user's preference properly across platforms.

In the meantime, I think it would be possible for a DrRacket plugin to use `drracket:get/extend:extend-interactions-text` and `drracket:get/extend:extend-definitions-text` to override the `blink-caret` method with a no-op.

-Philip

Philip McGrath

unread,
Nov 28, 2020, 4:16:15 PM11/28/20
to Racket Users

You should be able to install it with `raco pkg install https://github.com/LiberalArtist/disable-blink-caret-drracket-tool`.

Hope this helps!

-Philip

Robby Findler

unread,
Nov 28, 2020, 6:22:21 PM11/28/20
to Philip McGrath, Mark, Racket Users
I've pushed a change to DrRacket so you can set a preference in it to turn the blink off. As Philip says, the more difficult part will be getting the preference from the OS but at least that's a start.

Robby


--
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...@googlegroups.com.

Mark

unread,
Nov 29, 2020, 3:52:51 AM11/29/20
to Racket Users
It is easy to get the OS preference for Windows and Gtk. But it is actually _better_ to just have a config option since macOS doesn't offer any global config for this.

Mark

unread,
Nov 29, 2020, 3:58:42 AM11/29/20
to Racket Users
I tried that but it gave errors. However, the errors ended by suggesting adding '.git' so then I ran:


and then I ran drracket -- and no blinking! (It worked on both Linux and Windows).
Thank you:-)

Robby Findler

unread,
Nov 29, 2020, 9:13:50 AM11/29/20
to Mark, Racket Users
It would be nice to have DrRacket pay attention to the os-level preference when it exists. 

Robby 

Reply all
Reply to author
Forward
0 new messages