emacs-guix (publ. 2024-11-06)

I finished uploading my two videos for EmacsConf 2024, and I don't like taking walks in the winter. So, I have some time now during my lunchbreaks to work on programming projects. I've become fanatical now about Emacs, so I wanted to do something in that direction. A need I noticed a month or so ago was that the emacs-guix package, which is an Emacs interface to the guix operating system, has experienced some bitrot, and nobody else seems to have any time to work on it. So I decided to focus on fixing bugs in emacs-guix.

My main work so far has been troubleshooting on bug #73462, and then submitting a work-around patch:

=> emacs-guix: shell commands broken

In the process, I've learned quite a few things. For starters, I learned how to use the debbugs interface for Emacs, which allows me to view bugs, apply patches, and submit bugs, all from Emacs Gnus buffers.

=> GNU ELPA - debbugs

I already use Gnus for all my other e-mail work, so this is natural enough.

Here are some functions I use for quickly viewing my bugs:

(defun my-emacs-bugs ()
  (interactive)
  (apply #'debbugs-gnu-bugs
         (debbugs-get-bugs :package "emacs"
                           :submitter "me"
                           :status "open")))

(defun my-guix-bugs ()
  (interactive)
  (apply #'debbugs-gnu-bugs
         (debbugs-get-bugs :package "guix"
                           :submitter "me"
                           :status "open")))

The use of the string "me" for submitter assumes that you have set the variable user-mail-address.

I learned some things, of course, about how emacs-guix works, as well as the Guile Scheme guix code that it calls. You can see the bug report above to find out more about that.

I also cloned emacs-guix locally, and I did the work to set up things so that I could run from that local copy and uninstall the normal guix package. emacs-guix includes instructions for that. One thing I had to figure out on my own was how to put the dependencies of emacs-guix in my home configuration, without having emacs-guix itself installed in the profile.

(home-environment
  ;; Below is the list of packages that will show up in your
  ;; Home profile, under ~/.guix-home/profile.
 (packages (append
            (map cadr (package-propagated-inputs emacs-guix))
            emacs-packages
            (specifications->packages
             (list "abook"
                   "anki"
                   ...etc...

So, what I am doing there is using package-propagated-inputs from (guix packages) to pull the dependencies of emacs-guix out of the emacs-guix package object, taken from (guix packages emacs-xyz). The propogated-inputs are the ones needed by emacs-guix to work during run time.

scheme@(guix-user)> (map cadr (package-propagated-inputs emacs-guix))
$7 = (# # # # # # #)

Technically, we need the regular inputs as well, but in this case those are simply...

scheme@(guix-user)> (map cadr (package-inputs emacs-guix))
$5 = (# #)

And for sure guix and guile binaries are already going to be available in my environment

One thing I'm a little confused about is how the Guile REPL in Emacs knows where the emacs-guix scheme code is located in my local repo. I wonder if maybe it is using a cached version of that.

Finally, here is the emacs-guix screenshot you never asked for:

=> complementary emacs-guix screenshot

Copyright

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

=> CC BY-SA 4.0 Deed

Proxy Information
Original URL
gemini://gem.librehacker.com/gemlog/starlog/20241106-0.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
804.884023 milliseconds
Gemini-to-HTML Time
0.93964 milliseconds

This content has been proxied by September (ba2dc).