I’m trying to configure my Emacs so that I get access to Guix documentation and source code when I writing my configuration files. I did RTFM, but I can’t get it to work. More specifically, Geiser can only find symbol definitions if they are in the same buffer.

Actually, I realize I have the same problem as this person: https://unix.stackexchange.com/questions/761784/how-to-get-guix-perfect-setup-to-work

The Guix REPL can find the Guix source code, but the Geiser Guile REPL can’t (even though the right path is loaded, it seems). The stackexchange solution is basically a hack and can’t be the proper one, right? So, how do you do when developing Guix in Emacs?

Should I post a bug report about the “perfect setup” chapter in the Reference Manual or am I just incompetent?

  • sithOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    13 days ago

    Solved it! And it was mostly due to my incompetence (like not being good at RTFM and being a Guile Scheme noob). I did the following to get a functional Emacs environment for hacking on my Guix home configuration:

    1. Load the right path by adding the following to my init.el.
    (with-eval-after-load 'geiser-guile
      (add-to-list 'geiser-guile-load-path "~/.config/guix/current/share"))
    (with-eval-after-load 'geiser-guile
      (add-to-list 'geiser-guile-load-path "~/src/nonguix"))
    
    1. Load the configuration file with Geiser Guile. C-c C-l or geiser-load-file or geiser-load-current-buffer.

    Then it should work.

    I thought that it was enough to load the path to the cloned Guix (not compiled) source code and then just open a Geiser Guile REPL associated with the current file.

    These two chapter in the manual helped: https://guix.gnu.org/manual/en/guix.html#Invoking-guix-repl and https://guix.gnu.org/manual/en/guix.html#Using-Guix-Interactively. I kind of missed these chapters and went straight for the “perfect setup”.

    I think the manual should inform new users that they can load ~/.config/guix/current/share/ into Geiser Guile if they want to hack on their home configuration. Or maybe I missed that part.