Subject: Re: bug#42333: Emacs: error on guix-emacs-autoload-packages

From: Alexandru-Sergiu Marton <[email-masked]>
Date: Mon, 13 Jul 2020 12:41:08 +0300

Alexandru-Sergiu Marton <[email-masked]> writes:

> This way guix-emacs-autoload-packages works again. I installed ALL the
> packages I needed from Guix (I ditched Doom Emacs) and generating my
> site works too now.

I managed to narrow down the problem. If I install Doom Emacs, Guix's
EMACSLOADPATH doesn't seem to be loaded at all into the load-path
variable. This can be fixed with:

(mapc (lambda (p) (add-load-path! p)) (split-string (getenv "EMACSLOADPATH") ":"))

At this point it doesn't complain about that contrib path not being
found. To get there, I pulled my config [1] and ran `doom sync`.

The next time I fired up Emacs and I tried to run
`guix-emacs-autoload-packages` it started to complain about that path.
So I guess somewhere in that processes it screws up the load-path even
more if it manages to add "$GUIX_PROFILE/share/emacs/site-lisp/contrib"
in there.

Since I couldn't find anything actually there or using that path, for
now I have this in my config:

(delete (concat (getenv "HOME") "/.guix-profile/share/emacs/site-lisp/contrib") load-path)

I still have no idea why is the thing behaving the way that it is since
I never had issues like this with the same config on my other machine.
If you have any pointers as to what might have happened or had similar
problems yourself I would love to hear from you.

[1] https://git.sr.ht/~brown121407/dotfiles/tree/master/doom/.config/doom

--
Sergiu