GNU bug report logs - #75709
Emacs fails to start with "List contains a loop" error

Previous Next

Package: guix;

Reported by: Thiago Jung Bauermann <bauermann <at> kolabnow.com>

Date: Mon, 20 Jan 2025 23:32:02 UTC

Severity: important

Merged with 75749

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Thiago Jung Bauermann <bauermann <at> kolabnow.com>, 75709 <at> debbugs.gnu.org
Cc: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>, James Smith <jsubuntuxp <at> disroot.org>
Subject: bug#75709: Emacs fails to start with "List contains a loop" error
Date: Wed, 22 Jan 2025 19:19:14 +0100
Hi Thiago

Am Montag, dem 20.01.2025 um 19:43 -0300 schrieb Thiago Jung Bauermann:
> 
> Since a recent "guix pull", Emacs (I tested with the emacs-pgtk
> package)
> can't start up anymore:
> 
> $ emacs
> List contains a loop: ("/home/user/.guix-profile/lib/emacs/native-
> site-lisp" "/gnu/store/k62mmzkbmivw2r3wwlpcxs3lp9vwjyac-emacs-lsp-
> mode-9.0.0/lib/emacs/native-site-lisp" "/home/user/.guix-
> profile/lib/emacs/native-site-lisp" "/home/user/.guix-
> profile/lib/emacs/native-site-lisp"
> "/gnu/store/k62mmzkbmivw2r3wwlpcxs3lp9vwjyac-emacs-lsp-mode-
> 9.0.0/lib/emacs/native-site-lisp" . #2)
> $ echo $?
> 255
> 
> The root cause of the problem is that I have duplicate path entries
> in these environment variables:
> 
> $ env | grep EMACS
> EMACSNATIVELOADPATH=/home/sademeo/.guix-profile/lib/emacs/native-
> site-lisp:/home/sademeo/.guix-profile/lib/emacs/native-site-lisp
> EMACSLOADPATH=/home/sademeo/.guix-profile/share/emacs/site-
> lisp:/home/sademeo/.guix-profile/share/emacs/site-lisp
> 
> If I remove the duplicate entries, Emacs starts correctly again.
> 
> I suppose this is a common problem (it's surprisingly hard to ensure
> a given shell initialization snippet will run only once), and also
> it's hardly a fatal or unrecoverable error. 
You quite likely have redundant code in your shell init scripts.  Note
that your Guix profile should already be sourced on Guix System without
adding anything to them.

> IMHO it should warrant at most a warning message (if that), not a
> complete abort of the program.
> 
> With that in mind, I bisected Guix and arrived at this commit:
> 
> e9b13294700de7082ee23aa6e1c17b4a8c8828ec is the first bad commit
> commit e9b13294700de7082ee23aa6e1c17b4a8c8828ec
> […]

Try replacing nconc with append and see whether it fixes your issue. 
You can reproduce this more easily with

  $ guix shell emacs-pgtk emacs-dash \
         --with-input=emacs-minimal=emacs-pgtk -- \
         sh -c 'source $GUIX_ENVIRONMENT/etc/profile && emacs'

Cheers




This bug report was last modified 103 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.