Guix REPL in Emacs (publ. 2024-01-24)

Part of my quest for world domin... err, automating more of my local computer processes, is being able to control Guix directly through lisp commands. The "guix repl" command is intended for that purpose, bringing up a guile prompt inside guix-user module, with everything initialized for interacting with your profile.

Of course, it isn't fun until you can interact with it through Emacs. Conveniently, "guix repl" has a --listen parameter for connecting to listening on either a tcp port or a Unix-domain socket.

And inside Emacs, geiser can connect to either a tcp port or a unix socket through geiser-connect or geiser-connect-local, respectively. I threw together this for starting it up in Emacs:

This works but has a bug that, for some unknown reason, geiser does not start receiving input from "guix repl" until you press C-g (in Emacs). After that it behaves normally. I'm mildly curious to try this using a domain socket instead, maybe with a random filename so I can have more than one REPL at a time.

This work © 2024 by Christopher Howard is licensed under Attribution-ShareAlike 4.0 International.

CC BY-SA 4.0 Deed

Proxied content from gemini://gem.librehacker.com/gemlog/starlog/20240124-0.gmi

Gemini request details:

Original URL
gemini://gem.librehacker.com/gemlog/starlog/20240124-0.gmi
Status code
Success
Meta
text/gemini
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.