Posted on by Chris Warburton

There’s a strange display bug which causes a few programs, including st and conkeror, to show garbled text after resuming from suspend. This persists until the application is restarted.

Since my shell session is persistent (using dtach) this isn’t too bad; a simple killall st; st -e shell will get me back to where I was.

I can’t do this with Conkeror (or, at least, I don’t know how), and restarting causes me to lose any open buffers. To work around this, today I thought I’d bite the bullet and write a simple script to save all of the open buffer URLs, restart Conkeror, and re-open the URLs.

This turned out to be a bit more complicated than I thought, so here are some things I’ve learned:

Racket Modules

The prospect of writing another Bash script made me feel dirty, so instead I thought I’d opt for using Racket. I’ve dabbled with Scheme and Racket before, but hadn’t really looked into its module and package system.

Racket (formerly “PLT Scheme”) has two packaging systems, the deprecated “PLaneT” system and its newer replacement. PLaneT looks pretty nice: you use (require (planet foo)) and the foo module will be fetched and made available. Unfortunately, since it’s deprecated, new packages aren’t available via PLaneT, requiring use of the new replacement via the raco command. This is pretty annoying, since raco seems to be much like a Racket equivalent of Cabal: external to the language, requiring some kind of elaborate workaround to use in a similar way to PLaneT; it also doesn’t seem to have a sandbox equivalent, relying either on the home directory (a bad idea), or the Racket installation directory which requires Nix infrastructure similar to haskellPackages.ghcWithPackages, which doesn’t exist yet.


Unfortunately, doesn’t actually work for some applications.